From 9153405b2c06aa1d6daa5efd8e2364d925bb21ed Mon Sep 17 00:00:00 2001 From: Allan Lasser Date: Mon, 22 Apr 2024 16:27:36 -0400 Subject: [PATCH] Fix issues in AddOnsNavigation --- src/lib/components/addons/AddOnsNavigation.svelte | 13 ++++++++----- src/routes/app/add-ons/+page.svelte | 4 +++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/lib/components/addons/AddOnsNavigation.svelte b/src/lib/components/addons/AddOnsNavigation.svelte index b0bd23cca..a2f7285e6 100644 --- a/src/lib/components/addons/AddOnsNavigation.svelte +++ b/src/lib/components/addons/AddOnsNavigation.svelte @@ -21,7 +21,7 @@ All @@ -29,7 +29,7 @@ Pinned @@ -37,7 +37,7 @@ Featured @@ -45,7 +45,7 @@ Premium @@ -54,7 +54,10 @@ Collections {#each CATEGORIES as [key, label]} - + {label} diff --git a/src/routes/app/add-ons/+page.svelte b/src/routes/app/add-ons/+page.svelte index 2c44caa3d..c272e6ee8 100644 --- a/src/routes/app/add-ons/+page.svelte +++ b/src/routes/app/add-ons/+page.svelte @@ -48,7 +48,9 @@ $: active = Array.from(($page.url as URL).searchParams.entries()).find( ([_, value]) => value === "true", - )?.[0] ?? "all"; + )?.[0] ?? + ($page.url as URL).searchParams.get("category") ?? + "all"; $: showTip = ["active", "featured", "premium"].includes(active); $: query = ($page.url as URL).searchParams.get("query") ?? "";