/** * Organization page actions hook * Handles navigation and organization selection actions * Separated from complex state management for better SRP */ import { useCallback } from 'react'; import { useNavigate } from 'react-router-dom'; import type { Organization } from '@/types.ts'; export const useOrganizationActions = () => { const navigate = useNavigate(); const handleSelectOrg = useCallback( (org: Organization) => { navigate(`/organization/${org.ID}`); }, [navigate] ); const handleMapNavigation = useCallback(() => { navigate('/map'); }, [navigate]); return { handleSelectOrg, handleMapNavigation, }; };