MCPcopy Index your code
hub / github.com/coder/coder / useLinks

Function useLinks

site/src/modules/navigation.ts:11–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9type LinkThunk = (state: DashboardValue) => string;
10
11export function useLinks() {
12 const dashboard = useDashboard();
13 const get = useCallback(
14 (thunk: LinkThunk): string => thunk(dashboard),
15 [dashboard],
16 );
17 return get;
18}
19
20function withFilter(path: string, filter: string) {
21 return path + (filter ? `?filter=${encodeURIComponent(filter)}` : "");

Callers 15

TemplateFilesFunction · 0.90
useWorkspaceDuplicationFunction · 0.90
WorkspaceTopbarFunction · 0.90
WorkspaceFunction · 0.90
TemplateVersionEditorFunction · 0.90
TemplateVersionPageViewFunction · 0.90
TemplateVersionPageFunction · 0.90
CreateTemplatePageFunction · 0.90
WorkspacesEmptyFunction · 0.90
WorkspaceResultsRowFunction · 0.90

Calls 1

useDashboardFunction · 0.90

Tested by

no test coverage detected