mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
19 lines
493 B
TypeScript
19 lines
493 B
TypeScript
"use client";
|
|
|
|
import { FiefAuthProvider } from "@fief/fief/nextjs/react";
|
|
import { createContext } from "react";
|
|
|
|
export const CookieContext = createContext<{ hasAuthCookie: boolean }>({
|
|
hasAuthCookie: false,
|
|
});
|
|
|
|
export default function FiefWrapper({ children, hasAuthCookie }) {
|
|
return (
|
|
<CookieContext.Provider value={{ hasAuthCookie }}>
|
|
<FiefAuthProvider currentUserPath="/api/current-user">
|
|
{children}
|
|
</FiefAuthProvider>
|
|
</CookieContext.Provider>
|
|
);
|
|
}
|