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

Function segments

packages/shared/src/components/sidebar/SidebarEntityIcon.tsx:11–12  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

9import { useAuthContext } from '../../contexts/AuthContext';
10
11const segments = (path: string): string[] =>
12 path.split('?')[0].split('#')[0].split('/').filter(Boolean);
13
14// A squad shortcut's handle is the segment right AFTER /squads/ — not the last
15// one, which on a sub-page (/squads/<handle>/members) is the sub-page itself.

Callers 1

squadHandleFromPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected