diff options
| author | Fuwn <[email protected]> | 2023-10-22 11:14:05 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-10-22 11:14:05 -0700 |
| commit | 814e8d817bf2cccb1b8a4a4ac2e9cf52b115a539 (patch) | |
| tree | f8db5e7e093f764128453cb77ffca7a796bf8373 | |
| parent | fix(list): hide caught up last updated highlight (diff) | |
| download | due.moe-814e8d817bf2cccb1b8a4a4ac2e9cf52b115a539.tar.xz due.moe-814e8d817bf2cccb1b8a4a4ac2e9cf52b115a539.zip | |
feat(tools): use string query parameters
| -rw-r--r-- | src/routes/tools/+page.svelte | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/routes/tools/+page.svelte b/src/routes/tools/+page.svelte index 3976aeba..75bf5a40 100644 --- a/src/routes/tools/+page.svelte +++ b/src/routes/tools/+page.svelte @@ -6,25 +6,27 @@ export let data; - let tool = browser ? Number(new URLSearchParams(window.location.search).get('tool')) || 0 : 0; + let tool = browser + ? String(new URLSearchParams(window.location.search).get('tool')) || 'default' + : 'default'; </script> <p> <select bind:value={tool}> - <option value={0}>Tools</option> - <option value={1}>Today's Character Birthdays</option> - <option value={2}>Activity History Hole Risks</option> - <option value={3}>Wrapped (Beta)</option> + <option value="default">Tools</option> + <option value="todays_character_birthdays">Today's Character Birthdays</option> + <option value="activity_history_hole_risks">Activity History Hole Risks</option> + <option value="wrapped">Wrapped (Beta)</option> </select> </p> -{#if tool === 0} +{#if tool === 'default'} Select a tool to continue. -{:else if tool === 2} +{:else if tool === 'activity_history_hole_risks'} <ActivityHistory user={data.user} /> -{:else if tool === 3} +{:else if tool === 'wrapped'} <div id="wrapped"><Wrapped user={data.user} /></div> -{:else if tool === 1} +{:else if tool === 'todays_character_birthdays'} <ul> {#await todaysCharacterBirthdays()} <li>Loading ...</li> |