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