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

Function getAsPathname

packages/shared/src/components/shell/HomeSegments.tsx:38–41  ·  view source on GitHub ↗
(router: NextRouter)

Source from the content-addressed store, hash-verified

36// The address on screen, which can differ from the route: Happening now in
37// place under the widget rail keeps the feed page's route.
38const getAsPathname = (router: NextRouter): string =>
39 withoutLayoutVariantPrefix(
40 (router.asPath ?? router.pathname ?? '').split(/[?#]/)[0],
41 );
42
43interface OpenFeed {
44 title: string;

Callers 2

HappeningNowSheetFunction · 0.85
HomeSegmentsFunction · 0.85

Calls 1

Tested by

no test coverage detected