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

Function ShellStateProvider

packages/shared/src/contexts/ShellStateProvider.tsx:152–168  ·  view source on GitHub ↗
({
  children,
}: ShellStateProviderProps)

Source from the content-addressed store, hash-verified

150};
151
152export const ShellStateProvider = ({
153 children,
154}: ShellStateProviderProps): ReactElement => {
155 const { user } = useAuthContext();
156 useGqlBatchingFlag();
157 const [settledUserId, setSettledUserId] = useState<string>();
158 const isSettled = !user || settledUserId === user.id;
159
160 return (
161 <ShellStateContextProvider isSettled={isSettled}>
162 {!!user && (
163 <ShellStateRequest key={user.id} onSettled={setSettledUserId} />
164 )}
165 {children}
166 </ShellStateContextProvider>
167 );
168};

Callers

nothing calls this directly

Calls 2

useAuthContextFunction · 0.90
useGqlBatchingFlagFunction · 0.90

Tested by

no test coverage detected