fix: replace hard reload with SPA routing in seed phrase reminder

- Replace window.location.href with router.push() for /seed-backup navigation
- Prevents full page reload that was causing app remount and singleton loss
- Maintains singleton persistence and database connection across navigation

This fixes the issue where navigating to seed-backup page via the reminder
modal was triggering a full page reload, causing the PlatformService singleton
to be lost and database to be re-initialized unnecessarily.
This commit is contained in:
Matthew Raymer
2025-11-09 09:17:03 +00:00
parent 72e23a9109
commit 85a64b06d7

View File

@@ -1,4 +1,5 @@
import { NotificationIface } from "@/constants/app";
import router from "@/router";
const SEED_REMINDER_KEY = "seedPhraseReminderLastShown";
const REMINDER_COOLDOWN_MS = 24 * 60 * 60 * 1000; // 24 hours in milliseconds
@@ -53,8 +54,8 @@ export function createSeedReminderNotification(): NotificationIface {
yesText: "Backup Identifier Seed",
noText: "Remind me Later",
onYes: async () => {
// Navigate to seed backup page
window.location.href = "/seed-backup";
// Navigate to seed backup page using SPA routing
await router.push({ path: "/seed-backup" });
},
onNo: async () => {
// Mark as shown so it won't appear again for 24 hours