hotfix:fix state temporarily
This commit is contained in:
22
state.ts
22
state.ts
@@ -40,17 +40,17 @@ let initialState = {
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
try {
|
||||
localStorageState = localStorage.getItem('hooksIdeState');
|
||||
} catch (err) {
|
||||
console.log(`localStorage state broken`);
|
||||
localStorage.removeItem('hooksIdeState');
|
||||
}
|
||||
}
|
||||
if (localStorageState) {
|
||||
initialState = JSON.parse(localStorageState);
|
||||
}
|
||||
// if (typeof window !== 'undefined') {
|
||||
// try {
|
||||
// localStorageState = localStorage.getItem('hooksIdeState');
|
||||
// } catch (err) {
|
||||
// console.log(`localStorage state broken`);
|
||||
// localStorage.removeItem('hooksIdeState');
|
||||
// }
|
||||
// }
|
||||
// if (localStorageState) {
|
||||
// initialState = JSON.parse(localStorageState);
|
||||
// }
|
||||
|
||||
// Initialize state
|
||||
export const state = proxy<IState>(initialState);
|
||||
|
||||
Reference in New Issue
Block a user