UNPKG

@duongtrungnguyen/next-helper

Version:
33 lines 1.01 kB
import { type ReactNode } from "react"; /** * AuthProvider component that provides authentication context to its children. * * @param {Object} props - The props object. * @param {ReactNode} props.children - The child components that will have access to the authentication context. * * @returns {JSX.Element} The AuthContext.Provider component with the authentication context value. * * @component * * @example * ```tsx * import { AuthProvider } from './auth/client-components'; * * const App = () => ( * <AuthProvider> * <YourComponent /> * </AuthProvider> * ); * ``` * * @remarks * This component manages the authentication state and provides methods for login, logout, and token refresh. * It initializes the authentication state on mount and updates the state based on the authentication status. * * @function * @name AuthProvider */ export declare const AuthProvider: ({ children }: { children: ReactNode; }) => JSX.Element; //# sourceMappingURL=client-components.d.ts.map