fix: pass null if not found

This commit is contained in:
karishmas6
2024-09-24 12:09:01 +05:30
parent 2131b5307f
commit 1dd1b6fbdb

View File

@@ -53,7 +53,7 @@ const Provider = ({ children }: ProviderProps) => {
useEffect(() => { useEffect(() => {
dispatch({ dispatch({
type: 'LOGIN', type: 'LOGIN',
payload: JSON.parse(window.localStorage.getItem('user')), payload: JSON.parse(window.localStorage.getItem('user') || 'null'),
}); });
}, []); }, []);