diff --git a/src/ui/App/App.tsx b/src/ui/App/App.tsx index 268773170..87fc153a2 100644 --- a/src/ui/App/App.tsx +++ b/src/ui/App/App.tsx @@ -15,7 +15,6 @@ import relativeTime from 'dayjs/plugin/relativeTime'; import { GetStarted } from 'src/ui/pages/GetStarted'; import { Intro } from 'src/ui/pages/Intro'; import { Overview } from 'src/ui/pages/Overview'; -import { RouteResolver } from 'src/ui/pages/RouteResolver'; import { RequestAccounts } from 'src/ui/pages/RequestAccounts'; import { SendTransaction } from 'src/ui/pages/SendTransaction'; import { SignMessage } from 'src/ui/pages/SignMessage'; @@ -230,7 +229,7 @@ function Views({ initialRoute }: { initialRoute?: string }) { path="/nft/:chain/:asset_code" element={ - + } /> @@ -267,10 +266,10 @@ function Views({ initialRoute }: { initialRoute?: string }) { } /> - + } /> @@ -292,7 +291,6 @@ function Views({ initialRoute }: { initialRoute?: string }) { } /> - } /> } /> + {/* TODO: Should this page be removed? */} -
- -
- - ); -} diff --git a/src/ui/components/Splash/index.ts b/src/ui/components/Splash/index.ts deleted file mode 100644 index 6dfeda47d..000000000 --- a/src/ui/components/Splash/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { Splash } from './Splash'; diff --git a/src/ui/pages/RouteResolver/RouteResolver.tsx b/src/ui/pages/RouteResolver/RouteResolver.tsx deleted file mode 100644 index 107e34c30..000000000 --- a/src/ui/pages/RouteResolver/RouteResolver.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import React from 'react'; -// import { useLocation, useNavigate } from 'react-router-dom'; -import { Splash } from 'src/ui/components/Splash'; -// import { accountPublicRPCPort, walletPort } from 'src/ui/shared/channels'; -// import { getPageTemplateName } from 'src/ui/shared/getPageTemplateName'; - -// const templateName = getPageTemplateName(); - -export function RouteResolver({ - children, -}: React.PropsWithChildren>) { - // const location = useLocation(); - // const navigate = useNavigate(); - // const [ready, setReady] = useState(templateName === '/dialog.html'); - const ready = true; - // const { pathname } = location; - // console.log('RouteResolver', pathname, { templateName }); - // - const ARTIFICAL_WAIT_TIME = 0; - // useEffect(() => { - // if (ready) { - // return; - // } - // async function resolve() { - // if (ARTIFICAL_WAIT_TIME > 0) { - // await new Promise((r) => setTimeout(r, 300)); - // } - // // const isAuthenticated = await accountPublicRPCPort.request( - // // 'isAuthenticated' - // // ); - // // const existingUser = await accountPublicRPCPort.request( - // // 'getExistingUser' - // // ); - // // console.log({ isAuthenticated, existingUser }); - // // - // // if (!isAuthenticated) { - // // if (existingUser) { - // // navigate('/login'); - // // } else { - // // console.log('navigating to /'); - // // navigate('/'); - // // } - // // setReady(true); - // // return; - // // } - // const currentWallet = await walletPort.request('getCurrentWallet'); - // console.log({ currentWallet }); - // if (pathname === '/') { - // if (currentWallet) { - // navigate('/overview'); - // } - // } - // setReady(true); - // } - // - // resolve(); - // }, [navigate, pathname, ready]); - - if (!ready) { - return ARTIFICAL_WAIT_TIME > 0 ? : null; - } - return children as React.ReactElement; -} diff --git a/src/ui/pages/RouteResolver/index.ts b/src/ui/pages/RouteResolver/index.ts deleted file mode 100644 index 9bc43c843..000000000 --- a/src/ui/pages/RouteResolver/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { RouteResolver } from './RouteResolver';