import { useNavigate } from 'react-router-dom'; import { type AppPath, type NavigateOptions } from 'twenty-shared/types'; import { getAppPath } from 'twenty-shared/utils'; export const useNavigateApp = () => { const navigate = useNavigate(); return ( to: T, params?: Parameters>[1], queryParams?: Record, options?: NavigateOptions, ) => { const path = getAppPath(to, params, queryParams); return navigate(path, options); }; };