feat: add standalone explorer page at /explorer

This commit is contained in:
2026-02-16 01:27:40 +03:00
parent b3241005ba
commit 0f63c96b2c
12 changed files with 704 additions and 5 deletions
+12
View File
@@ -23,6 +23,9 @@ const WalletSection = lazy(() =>
const CitizenPage = lazy(() =>
import('@/pages/CitizenPage').then((m) => ({ default: m.CitizenPage }))
);
const ExplorerPage = lazy(() =>
import('@/pages/ExplorerPage').then((m) => ({ default: m.ExplorerPage }))
);
// Loading fallback component
function SectionLoader() {
@@ -57,6 +60,7 @@ const P2P_WEB_URL = 'https://telegram.pezkuwichain.io/p2p';
// Check for standalone pages via URL query params or path (evaluated once at module level)
const PAGE_PARAM = new URLSearchParams(window.location.search).get('page');
const IS_CITIZEN_PAGE = PAGE_PARAM === 'citizen' || window.location.pathname === '/citizens';
const IS_EXPLORER_PAGE = window.location.pathname.replace(/\/$/, '') === '/explorer';
export default function App() {
if (IS_CITIZEN_PAGE) {
@@ -67,6 +71,14 @@ export default function App() {
);
}
if (IS_EXPLORER_PAGE) {
return (
<Suspense fallback={<SectionLoader />}>
<ExplorerPage />
</Suspense>
);
}
return <MainApp />;
}