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

Function AuthDataProvider

packages/shared/src/contexts/AuthDataContext.tsx:16–32  ·  view source on GitHub ↗
({
  children,
  initialEmail = '',
}: AuthDataProviderProps)

Source from the content-addressed store, hash-verified

14}
15
16export const AuthDataProvider = ({
17 children,
18 initialEmail = '',
19}: AuthDataProviderProps): ReactElement => {
20 const [email, setEmail] = useState(initialEmail);
21
22 return (
23 <AuthDataContext.Provider
24 value={{
25 email,
26 setEmail,
27 }}
28 >
29 {children}
30 </AuthDataContext.Provider>
31 );
32};
33
34export const useAuthData = (): AuthDataContextData => {
35 const context = useContext(AuthDataContext);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected