Skip to content

Commit

Permalink
refactor: remove page tab
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniyalManzoor committed Oct 20, 2023
1 parent d8b6b3f commit f628755
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/components/NavBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ const Navbar = ({ blur }: { blur: boolean }) => {
<Box display={{ sm: 'flex', lg: 'none' }}>
<ChainSelector leftAlign={true} />
</Box>
<Row display={{ sm: 'none', lg: 'flex' }}>
{/* <Row display={{ sm: 'none', lg: 'flex' }}>
<PageTabs />
</Row>
</Row> */}
</Box>
<Box
className={styles.searchContainer}
Expand Down
22 changes: 9 additions & 13 deletions src/pages/RouteDefinitions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import { isBrowserRouterEnabled } from 'utils/env'
// High-traffic pages (index and /swap) should not be lazy-loaded.
import Swap from './Swap'

const Explore = lazy(() => import('pages/Explore'))
const RedirectExplore = lazy(() => import('pages/Explore/redirects'))
const NotFound = lazy(() => import('pages/NotFound'))
const TokenDetails = lazy(() => import('pages/TokenDetails'))

interface RouterConfig {
browserRouterEnabled?: boolean
hash?: string
Expand Down Expand Up @@ -69,23 +69,19 @@ export const routes: RouteDefinition[] = [
// },
// }),

createRouteDefinition({
path: '/tokens/:chainName',
getElement: (args) => {
return args.infoExplorePageEnabled ? <RedirectExplore /> : <Explore />
},
}),
// createRouteDefinition({
// path: '/tokens/:chainName',
// getElement: (args) => {
// return args.infoExplorePageEnabled ? <RedirectExplore /> : <Explore />
// },
// }),
createRouteDefinition({
path: '/tokens/:chainName/:tokenAddress',
getElement: (args) => {
return args.infoExplorePageEnabled ? <RedirectExplore /> : <TokenDetails />
},
}),
createRouteDefinition({
path: '/send',
getElement: () => <Navigate to={{ ...location, pathname: '/swap' }} replace />,
}),
createRouteDefinition({ path: '/swap', getElement: () => <Swap /> }),
createRouteDefinition({ path: '*', getElement: () => <Navigate to="/swap" replace /> }),
createRouteDefinition({ path: '/', getElement: () => <Swap /> }),
createRouteDefinition({ path: '*', getElement: () => <Navigate to="/" replace /> }),
createRouteDefinition({ path: '/not-found', getElement: () => <NotFound /> }),
]

0 comments on commit f628755

Please sign in to comment.