From 4273bab1fbaf792162fb6e395e7aa56e4d8e61b1 Mon Sep 17 00:00:00 2001 From: Bretton <36870434+BrettM86@users.noreply.github.com> Date: Thu, 16 Jul 2026 07:44:00 -0700 Subject: [PATCH] fix(profile): honor deep-linked ?type= filter on initial load The content-type filter state always started at 'all', so shared links and hard reloads of /profile/?type=posts rendered unfiltered. Seed the state from the URL param. Co-Authored-By: Claude Fable 5 --- src/routes/profile/[handle=handle]/+page.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/routes/profile/[handle=handle]/+page.svelte b/src/routes/profile/[handle=handle]/+page.svelte index 83914815..35751055 100644 --- a/src/routes/profile/[handle=handle]/+page.svelte +++ b/src/routes/profile/[handle=handle]/+page.svelte @@ -27,7 +27,11 @@ let { data, inline = false }: Props = $props() - let filterType = $state<'all' | 'posts' | 'comments'>('all') + // Seed from the URL so deep links / hard reloads honor ?type= + const initialType = page.url.searchParams.get('type') + let filterType = $state<'all' | 'posts' | 'comments'>( + initialType === 'posts' || initialType === 'comments' ? initialType : 'all', + ) let sortForm = $state() -- 2.51.2