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

Function withoutLayoutVariantPrefix

packages/shared/src/lib/layoutVariant.ts:10–16  ·  view source on GitHub ↗
(route?: string)

Source from the content-addressed store, hash-verified

8// `router.pathname` carries the mirror prefix on the mirrored route, so page
9// path checks have to drop it before comparing.
10export const withoutLayoutVariantPrefix = (route?: string): string => {
11 if (!route?.startsWith(`${LAYOUT_VARIANT_ROUTE_PREFIX}/`)) {
12 return route ?? '';
13 }
14
15 return route.slice(LAYOUT_VARIANT_ROUTE_PREFIX.length);
16};

Callers 6

SidebarDesktopV2Function · 0.90
FeedNavFunction · 0.90
useActiveNavFunction · 0.90
captureFunction · 0.90
FooterWrapperFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected