MCPcopy Create free account
hub / github.com/dailydotdev/apps / documentArrival

Function documentArrival

packages/shared/src/components/shell/shellNav.ts:281–289  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

279 `${globalThis.location?.pathname}${globalThis.location?.search}`;
280
281const documentArrival = (): DocumentArrival => {
282 const [navigation] = (globalThis.performance?.getEntriesByType?.(
283 'navigation',
284 ) ?? []) as PerformanceNavigationTiming[];
285
286 return navigation?.type === 'reload' || navigation?.type === 'back_forward'
287 ? navigation.type
288 : 'navigate';
289};
290
291export const useShellRouteStack = (): void => {
292 const router = useRouter();

Callers 1

useShellRouteStackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected