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

Function useOwnerDisplay

packages/react/src/api/owner-display.tsx:32–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30}
31
32export function useOwnerDisplay(): {
33 readonly isSinglePlayerHost: boolean;
34 readonly showOwnerLabels: boolean;
35 readonly label: (owner: Owner) => string;
36} {
37 const organizationId = useOrganizationId();
38 const isSinglePlayerHost = organizationId === null;
39 return {
40 isSinglePlayerHost,
41 showOwnerLabels: !isSinglePlayerHost,
42 label: (owner) => ownerLabelForHost(owner, organizationId),
43 };
44}

Callers 9

AccountsSectionFunction · 0.90
AddAccountModalViewFunction · 0.90
ToolTreeFunction · 0.90
AddPolicyFormFunction · 0.90
PoliciesPageFunction · 0.90
SecretPickerFunction · 0.90
ToolkitGridFunction · 0.90
ToolkitsPageFunction · 0.90
GraphqlSignInButtonFunction · 0.90

Calls 2

useOrganizationIdFunction · 0.90
ownerLabelForHostFunction · 0.85

Tested by

no test coverage detected