Skip to content

Commit 50c681e

Browse files
committed
fix/tests
1 parent e832031 commit 50c681e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

frontend/app/context/Auth.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type User = { email: string } | null;
77
type AuthCtx = {
88
user: User;
99
token: string | null;
10-
authHeader: () => Record<string, string>;
10+
authHeader: () => Partial<Record<string, string>>;
1111
};
1212

1313
const AuthContext = createContext<AuthCtx | null>(null);
@@ -18,7 +18,8 @@ export function AuthProvider({ children }: { children: ReactNode }) {
1818
const [token, setToken] = useState<string | null>(null);
1919
const [user, setUser] = useState<User>(null);
2020

21-
const authHeader = () => (token ? { Authorization: `Bearer ${token}` } : {});
21+
const authHeader = () =>
22+
token ? { Authorization: `Bearer ${token}` } : {};
2223

2324
return (
2425
<AuthContext.Provider value={{ user, token, authHeader }}>

0 commit comments

Comments
 (0)