1 Commits

Author SHA1 Message Date
d7aa4e3534 submitting form when loaded
calculates remaining time if there is a saved recorded time
2025-02-09 21:06:39 +00:00

View File

@@ -67,6 +67,13 @@ export function App() {
return () => sub.unsubscribe();
}, [handleSubmit, watch]);
// submit form when loaded if we have a previously recorded time
useEffect(() => {
if (getStoredRecordedTime()) {
handleSubmit(onSubmit)(null);
}
}, [handleSubmit]);
return (
<div class="window" style={{margin: "32px auto", width: "250px"}}>
<div class="title-bar">