compile fix

This commit is contained in:
Igor Loskutov
2025-09-02 19:12:04 -04:00
parent 1d5a22ad1d
commit 5e4f519c83
7 changed files with 38 additions and 27 deletions

View File

@@ -3,7 +3,11 @@
import { createContext, useContext, useEffect } from "react";
import { useSession as useNextAuthSession } from "next-auth/react";
import { configureApiAuth } from "./apiClient";
import { assertExtendedToken, CustomSession } from "./types";
import {
assertExtendedToken,
assertExtendedTokenAndUserId,
CustomSession,
} from "./types";
type AuthContextType =
| { status: "loading" }
@@ -19,7 +23,7 @@ const AuthContext = createContext<AuthContextType | undefined>(undefined);
export function AuthProvider({ children }: { children: React.ReactNode }) {
const { data: session, status } = useNextAuthSession();
const customSession = session ? assertExtendedToken(session) : null;
const customSession = session ? assertExtendedTokenAndUserId(session) : null;
const contextValue: AuthContextType =
status === "loading"