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

Function documentArrival

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

Source from the content-addressed store, hash-verified

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

Callers 1

useShellRouteStackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected