diff options
| author | Fuwn <[email protected]> | 2023-12-25 00:55:34 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-12-25 00:55:34 -0800 |
| commit | 21fdb442c2ad14f1198f6551e9c68d8342b95c3b (patch) | |
| tree | e85a42cddd9a2c7bc5446230ee4cc6c71a05d825 /src/routes/tools | |
| parent | feat(routes): route-specific head title (diff) | |
| download | due.moe-21fdb442c2ad14f1198f6551e9c68d8342b95c3b.tar.xz due.moe-21fdb442c2ad14f1198f6551e9c68d8342b95c3b.zip | |
refactor(tools): use svelte query
Diffstat (limited to 'src/routes/tools')
| -rw-r--r-- | src/routes/tools/+page.svelte | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/routes/tools/+page.svelte b/src/routes/tools/+page.svelte index a6a33aa4..1e336e75 100644 --- a/src/routes/tools/+page.svelte +++ b/src/routes/tools/+page.svelte @@ -11,9 +11,10 @@ export let data; - const urlParameters = browser ? new URLSearchParams(window.location.search) : null; let tool = - browser && urlParameters?.size !== 0 ? urlParameters?.get('tool') || 'default' : 'default'; + browser && $page.url.searchParams.size !== 0 + ? $page.url.searchParams.get('tool') || 'default' + : 'default'; const tools: { [key: string]: string } = { default: 'Tools', todays_character_birthdays: "Today's Character Birthdays", |