diff --git a/src/context/auth.tsx b/src/context/auth.tsx index 83c75b57..98fa4b49 100644 --- a/src/context/auth.tsx +++ b/src/context/auth.tsx @@ -53,7 +53,7 @@ const Provider = ({ children }: ProviderProps) => { useEffect(() => { dispatch({ type: 'LOGIN', - payload: JSON.parse(window.localStorage.getItem('user')), + payload: JSON.parse(window.localStorage.getItem('user') || 'null'), }); }, []);