From 5cedf4fb16e5760734195ea9326fcceec4a9657b Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Thu, 28 Sep 2023 15:21:02 -0700
Subject: feat(tools): select tool via query

---
 src/routes/tools/+page.svelte | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/routes/tools/+page.svelte')

diff --git a/src/routes/tools/+page.svelte b/src/routes/tools/+page.svelte
index b0bb5569..f4ffefd9 100644
--- a/src/routes/tools/+page.svelte
+++ b/src/routes/tools/+page.svelte
@@ -2,10 +2,11 @@
 	import ActivityHistory from '$lib/Tools/ActivityHistory.svelte';
 	import { todaysCharacterBirthdays } from '$lib/AniList/character';
 	import Wrapped from '$lib/Tools/Wrapped.svelte';
+	import { browser } from '$app/environment';
 
 	export let data;
 
-	let tool: number;
+	let tool = browser ? Number(new URLSearchParams(window.location.search).get('tool')) || 0 : 0;
 </script>
 
 <p>
-- 
cgit v1.2.3

