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>(
1111 { } as AuthenticationContextProps ,
1212) ;
1313
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+ */
1430export const AuthenticationProvider = ( { children } : PropsWithChildren ) => {
1531 const [ user , setUser ] = useState < boolean > ( false ) ;
16- // console.log("file: Authentication.tsx ~ line 19 ~ user", user);
1732
1833 return (
1934 < AuthenticationContext . Provider value = { { setUser, user } } >
You can’t perform that action at this time.
0 commit comments