Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

331 B
Raw Blame
import type { NavigateFunction } from 'react-router';

import { useGlobalStore } from '@/store/global';

/** Current imperative navigate from the ref synced by `NavigatorRegistrar` (non-React call sites). */
export function getStableNavigate(): NavigateFunction | null {
  return useGlobalStore.getState().navigationRef.current;
}