fix: pass null if not found
This commit is contained in:
@@ -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'),
|
||||
});
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user