mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-11-14 22:00:50 -05:00
refactor contact form server action
This commit is contained in:
@@ -23,9 +23,7 @@ const useLocalStorage = <T = string>(
|
||||
window.localStorage.setItem(key, serializer(initialValue));
|
||||
return initialValue;
|
||||
}
|
||||
} catch (
|
||||
error // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
) {
|
||||
} catch {
|
||||
return initialValue;
|
||||
}
|
||||
});
|
||||
@@ -51,7 +49,7 @@ const useLocalStorage = <T = string>(
|
||||
try {
|
||||
window.localStorage.removeItem(key);
|
||||
setState(undefined);
|
||||
} catch (error) {} // eslint-disable-line no-empty, @typescript-eslint/no-unused-vars
|
||||
} catch {} // eslint-disable-line no-empty
|
||||
}, [key]);
|
||||
|
||||
return [state, set, remove];
|
||||
|
||||
Reference in New Issue
Block a user