Skip to content

Commit

Permalink
form route gets preloaded so people dont have to create a form
Browse files Browse the repository at this point in the history
  • Loading branch information
SomewhatMay committed Mar 29, 2024
1 parent 0029458 commit 3be6444
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
import "../app.css";
import { goto } from "$app/navigation";
import { goto, preloadCode, preloadData } from "$app/navigation";
import { onMount } from "svelte";
import { lastGet, responseQueue } from "$lib/store";
import { get, append } from "$lib/sheet";
Expand Down Expand Up @@ -44,7 +44,11 @@
sync();
}, 6000);
}
onMount(() => sync())
onMount(() => {
sync();
preloadData("/form");
preloadCode("/form");
})
</script>

<nav
Expand Down

0 comments on commit 3be6444

Please sign in to comment.