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

Function withoutLayoutVariantPrefix

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

Source from the content-addressed store, hash-verified

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

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