MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / readRoute

Function readRoute

graph-ui/src/App.tsx:17–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15/* Read the active tab + selected project from the URL query string so the
16 * current view survives refreshes and can be bookmarked or shared. */
17function readRoute(): RouteState {
18 const params = new URLSearchParams(window.location.search);
19 const rawTab = params.get("tab");
20 const tab = TAB_IDS.includes(rawTab as TabId) ? (rawTab as TabId) : "stats";
21 const project = params.get("project");
22 return { tab, project: project ? project : null };
23}
24
25/* Build the canonical URL for a route, preserving the path and hash. */
26function routeUrl(tab: TabId, project: string | null): string {

Callers 2

AppFunction · 0.85
onPopStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected