Skip to content

Commit 5cc7417

Browse files
committed
Update UserContext to use AccessTokenPayload instead of UserProfile
1 parent b930cb3 commit 5cc7417

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

frontend/src/contexts/UserContext.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
AccessTokenPayload,
66
AccessTokenPayloadSchema,
77
} from "@/types/Token";
8-
import { UserProfile } from "@/types/User";
98
import React, {
109
createContext,
1110
useContext,
@@ -14,11 +13,11 @@ import React, {
1413
PropsWithChildren,
1514
} from "react";
1615

17-
const UserContext = createContext<UserProfile | undefined>(undefined);
16+
const UserContext = createContext<AccessTokenPayload | undefined>(undefined);
1817

1918
export function UserProvider({ children }: PropsWithChildren) {
2019
// TODO: Once User Service is implemented on the backend, fetch user profile
21-
const [user, setUser] = useState<UserProfile>();
20+
const [user, setUser] = useState<AccessTokenPayload>();
2221

2322
useEffect(() => {
2423
const token = localStorage.getItem("access_token");

0 commit comments

Comments
 (0)