UNPKG

@jeanmemory/react

Version:

React SDK for Jean Memory - Build personalized AI chatbots in 5 lines of code

31 lines (30 loc) 1.1 kB
/** * Jean Memory React SDK - Authentication Guard Component * Automatically handles authentication flow with customizable fallbacks */ import React from 'react'; interface JeanAuthGuardProps { children: React.ReactNode; /** Custom loading component while checking authentication */ loadingComponent?: React.ReactNode; /** Custom sign-in component when not authenticated */ signInComponent?: React.ReactNode; /** Custom fallback when not authenticated (overrides signInComponent) */ fallback?: React.ReactNode; /** Show default sign-in UI (default: true) */ showDefaultSignIn?: boolean; } /** * AuthGuard component that automatically handles authentication state * * @example * ```jsx * <JeanProvider apiKey="your-key"> * <JeanAuthGuard> * <YourApp /> * </JeanAuthGuard> * </JeanProvider> * ``` */ export declare function JeanAuthGuard({ children, loadingComponent, signInComponent, fallback, showDefaultSignIn }: JeanAuthGuardProps): string | number | true | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null; export {};