From 913db2a5252e26ad9f0c0537169ea2d702635dae Mon Sep 17 00:00:00 2001 From: Rotimi Best Date: Tue, 18 Aug 2026 13:58:26 +0100 Subject: [PATCH] fix(dashboard): repair certificates tab handler so main can build (#929) * fix(dashboard): repair certificates tab handler so main can build #854 left a duplicated, unclosed handleActiveTabChange that made the dashboard production build fail with a Svelte parse error. Keep the active tab in local state and sync the query string with replaceState so UnsavedChanges is not triggered. Co-authored-by: best * fix(dashboard): resync certificate tab when the course page is reused SvelteKit reuses courses/[id]/certificates across course ids, so a one-time tab initializer could stick. Resync from page.url in $effect.pre without reading local tab state, since replaceState does not update page.url. Co-authored-by: best --------- --- .../courses/[id]/certificates/+page.svelte | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/apps/dashboard/src/routes/(app)/courses/[id]/certificates/+page.svelte b/apps/dashboard/src/routes/(app)/courses/[id]/certificates/+page.svelte index 29649f93..981e5e19 100644 --- a/apps/dashboard/src/routes/(app)/courses/[id]/certificates/+page.svelte +++ b/apps/dashboard/src/routes/(app)/courses/[id]/certificates/+page.svelte @@ -1,6 +1,6 @@