vite-project v0.0.0


Function: AuthProvider()

AuthProvider(children): Element

Defined in: src/context/AuthContext.tsx:133

Provides the authentication context and state to all child components.

Parameters

children

React component tree to be wrapped by the provider.

children

ReactNode

Returns

Element

A React context provider that supplies AuthContextType to its children.

Remarks

  • Should wrap your entire application (usually in main.tsx or index.tsx).

  • Exposes authentication and conversation state/actions via useAuth.

Example

import { AuthProvider } from "./context/AuthContext";

const root = createRoot(document.getElementById("root")!);
root.render(
  <AuthProvider>
    <App />
  </AuthProvider>
);