MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / getActiveOrgSlug

Function getActiveOrgSlug

packages/react/src/api/server-connection.tsx:94–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92export const EXECUTOR_ORG_HEADER = EXECUTOR_ORG_SELECTOR_HEADER;
93
94export const getActiveOrgSlug = (): string | null => {
95 const pathname = globalThis.window?.location?.pathname;
96 if (!pathname) return null;
97 const first = pathname.split("/")[1];
98 return first && isValidOrgSlug(first) ? first : null;
99};
100
101export const getExecutorOrganizationHeaders = (): Readonly<Record<string, string>> => {
102 const orgSlug = getActiveOrgSlug();

Callers 5

account-client.tsxFile · 0.90
client.tsxFile · 0.90
client.tsxFile · 0.90

Calls 1

isValidOrgSlugFunction · 0.90

Tested by

no test coverage detected