Skip to content

Commit

Permalink
fix: open last visited budget during startup
Browse files Browse the repository at this point in the history
Signed-off-by: rare-magma <[email protected]>
  • Loading branch information
rare-magma committed Aug 27, 2024
1 parent 6d75ac9 commit 300db9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
<link rel="icon" href="/favicon.svg" />
<link rel="apple-touch-icon" href="/favicon.svg" />
<link rel="manifest" href="/manifest.json" />
<script>
const lastOpenedBudget = localStorage.getItem("guitos_lastOpenedBudget");
if (lastOpenedBudget) {
window.location.href = last
}
</script>

<title>guitos</title>
</head>
Expand Down
1 change: 1 addition & 0 deletions src/hooks/useMove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export function useMove() {
}
}, 100);
navigate(`/${selectedBudget[0].name}`);
localStorage.setItem("guitos_lastOpenedBudget", selectedBudget[0].name);
}
}

Expand Down

0 comments on commit 300db9c

Please sign in to comment.