File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
hackathon/spacecraft/src/context Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,24 @@ const AuthenticationContext = createContext<AuthenticationContextProps>(
11
11
{ } as AuthenticationContextProps ,
12
12
) ;
13
13
14
+ /**
15
+ * AuthenticationProvider component that provides authentication context to its children.
16
+ *
17
+ * @param {PropsWithChildren } props - The props for the component, including children.
18
+ *
19
+ * @remarks
20
+ * This component uses a boolean state to represent the user's authentication status.
21
+ * The `setUser` function is provided to update the authentication status.
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * <AuthenticationProvider>
26
+ * <YourComponent />
27
+ * </AuthenticationProvider>
28
+ * ```
29
+ */
14
30
export const AuthenticationProvider = ( { children } : PropsWithChildren ) => {
15
31
const [ user , setUser ] = useState < boolean > ( false ) ;
16
- // console.log("file: Authentication.tsx ~ line 19 ~ user", user);
17
32
18
33
return (
19
34
< AuthenticationContext . Provider value = { { setUser, user } } >
You can’t perform that action at this time.
0 commit comments