From 8367ecd905b76a432e487ec9385aca155bb161e1 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sun, 3 Dec 2023 21:17:49 -0800
Subject: feat(tools): serialise settings into url

---
 src/lib/Tools/CharacterBirthdays.svelte | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'src/lib/Tools/CharacterBirthdays.svelte')

diff --git a/src/lib/Tools/CharacterBirthdays.svelte b/src/lib/Tools/CharacterBirthdays.svelte
index f3112fa6..c58f59c3 100644
--- a/src/lib/Tools/CharacterBirthdays.svelte
+++ b/src/lib/Tools/CharacterBirthdays.svelte
@@ -4,6 +4,7 @@
 	import { ACDBBirthdays, type ACDBBirthday } from '$lib/Birthday/ACDB';
 	import { aniSearchBirthdays, type aniSearchBirthday } from '$lib/Birthday/aniSearch';
 	import Error from '$lib/Error.svelte';
+	import { clearAllParameters } from './tool';
 
 	interface Birthday {
 		name: string;
@@ -35,6 +36,7 @@
 		if (browser) {
 			$page.url.searchParams.set('month', month.toString());
 			$page.url.searchParams.set('day', day.toString());
+			clearAllParameters(['month', 'day']);
 			history.replaceState(null, '', `?${$page.url.searchParams.toString()}`);
 		}
 	}
-- 
cgit v1.2.3

