From 52fdbe4f99dcddaea8bbe06bab67d9e29e77f369 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 1 Dec 2025 19:50:36 +0000 Subject: [PATCH] Add localStorage persistence to VersionSelect The VersionSelect component now saves the user's edition preference to localStorage and automatically applies it when returning to the site. This ensures users consistently see their preferred version across visits. - Save selected edition name to localStorage on change - Check localStorage on page load and redirect to preferred edition if different - Add error handling for localStorage access failures --- src/components/VersionSelect.astro | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/src/components/VersionSelect.astro b/src/components/VersionSelect.astro index 6cbcd95..c850df1 100644 --- a/src/components/VersionSelect.astro +++ b/src/components/VersionSelect.astro @@ -86,6 +86,11 @@ const showVersionSelect = isVersionedPage(Astro.url.pathname) \ No newline at end of file