fix: prevent repeated redirect when switching from grid to sidebar view

The default-view redirect in HomePage fired on every mount, not just the
initial page load. A module-level flag now gates the redirect so it only
applies once per session, allowing users to switch to sidebar view when
grid is the default.

Closes #128
This commit is contained in:
SnapOtter
2026-05-07 22:16:26 +08:00
parent ff8a280b45
commit 14810c3c78
3 changed files with 168 additions and 1 deletions
+1
View File
@@ -108,6 +108,7 @@ export default defineConfig({
sharp: path.join(apiNodeModules, "sharp"),
react: path.join(webNodeModules, "react"),
"react-dom": path.join(webNodeModules, "react-dom"),
"react-router-dom": path.join(webNodeModules, "react-router-dom"),
zustand: path.join(webNodeModules, "zustand"),
"posthog-js": path.join(webNodeModules, "posthog-js"),
"@sentry/react": path.join(webNodeModules, "@sentry/react"),