Skip to content

Commit

Permalink
🔧 Minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
nwrenger committed Mar 10, 2024
1 parent a7f1ee4 commit 9b72f0c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib-view/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,11 @@
category.set(categories);
}
async function updatePeriodically() {
await update();
}
onMount(() => {
// Run the `update` function immediately on mount
updatePeriodically();
update();
const interval = setInterval(updatePeriodically, 300000);
const interval = setInterval(update, 300000);
// Cleanup the interval when the component is unmounted
return () => {
Expand Down

0 comments on commit 9b72f0c

Please sign in to comment.