From d629e4e5072316bfa59d7b0add686b2e14da39e6 Mon Sep 17 00:00:00 2001 From: S2kael Date: Mon, 23 Oct 2023 11:13:30 +0700 Subject: [PATCH] [Issue-2051] Update auto navigate --- packages/extension-koni-ui/src/Popup/Root.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/extension-koni-ui/src/Popup/Root.tsx b/packages/extension-koni-ui/src/Popup/Root.tsx index 0be7b71cd3..16401f7c45 100644 --- a/packages/extension-koni-ui/src/Popup/Root.tsx +++ b/packages/extension-koni-ui/src/Popup/Root.tsx @@ -183,6 +183,14 @@ function DefaultRoute ({ children }: { children: React.ReactNode }): React.React } } else if (pathName === loginUrl && !needUnlock) { redirectTarget = DEFAULT_ROUTER_PATH; + } else if (pathName === welcomeUrl && !noAccount) { + redirectTarget = DEFAULT_ROUTER_PATH; + } else if (pathName === migratePasswordUrl && !needMigrate) { + if (noAccount) { + redirectTarget = welcomeUrl; + } else { + redirectTarget = DEFAULT_ROUTER_PATH; + } } else if (hasInternalConfirmations) { openPModal('confirmations'); } else if (!hasInternalConfirmations && isOpenPModal('confirmations')) {