prettier format

This commit is contained in:
mbaharip
2024-05-18 15:19:11 +07:00
parent 356c8fc3e9
commit e5367e9a1a
8 changed files with 89 additions and 135 deletions
+1 -2
View File
@@ -23,8 +23,7 @@ export default function useLocalStorage<T>(key: string, initialValue: T) {
// Create dispatch function to set or remove localStorage
const setValue: SetValue<T> = (value) => {
try {
const valueToStore =
value instanceof Function ? value(storedValue) : value;
const valueToStore = value instanceof Function ? value(storedValue) : value;
setStoredValue(valueToStore);
window.localStorage.setItem(key, JSON.stringify(valueToStore));
} catch (error) {