Skip to content

Commit

Permalink
remove unused context
Browse files Browse the repository at this point in the history
  • Loading branch information
kayra1 committed Jul 22, 2024
1 parent e729508 commit dafa6b6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ui/src/app/auth/authContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ import { useRouter } from 'next/navigation';

type AuthContextType = {
user: User | null
setUser: Dispatch<SetStateAction<User | null>>
}

const AuthContext = createContext<AuthContextType>({ user: null, setUser: () => { } });
const AuthContext = createContext<AuthContextType>({ user: null });

export const AuthProvider = ({ children }: Readonly<{ children: React.ReactNode }>) => {
const [cookies, setCookie, removeCookie] = useCookies(['user_token']);
Expand All @@ -30,7 +29,7 @@ export const AuthProvider = ({ children }: Readonly<{ children: React.ReactNode
}, [cookies.user_token, router]);

return (
<AuthContext.Provider value={{ user, setUser }}>
<AuthContext.Provider value={{ user }}>
{children}
</AuthContext.Provider>
);
Expand Down

0 comments on commit dafa6b6

Please sign in to comment.