Skip to content

Commit

Permalink
fix(Save/Restore ui): add return type for confirmExit
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoValentine committed Sep 16, 2023
1 parent dcf7dfe commit 40272f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ interface IndexProp {
export default function Home(props: IndexProp): React.ReactElement {
const { simulationParams, setSimulationParams, worker } = props;
useEffect(() => {
const confirmExit = (e: BeforeUnloadEvent) => {
const confirmExit = (e: BeforeUnloadEvent): void => {
console.log('beforeunload event triggered');
e.preventDefault();
e.returnValue = '';
Expand Down

0 comments on commit 40272f5

Please sign in to comment.