Skip to content

Commit

Permalink
move to /earn and /swap
Browse files Browse the repository at this point in the history
  • Loading branch information
lufaque committed Dec 2, 2023
1 parent 2c5f523 commit dd3fe73
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/Navigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const Navigator: FC<NavigatorProps> = () => (
<Header />
<Routes>
<Route
path={routes.exchange}
path={routes.swap}
element={
<Suspense fallback={<FullScreenLoader />}>
<ExchangeScreen />
Expand All @@ -33,14 +33,14 @@ export const Navigator: FC<NavigatorProps> = () => (
}
/>
<Route
path={routes.staking}
path={routes.earn}
element={
<Suspense fallback={<FullScreenLoader />}>
<StakingScreen />
</Suspense>
}
/>
<Route path={routes.root} element={<Navigate to={routes.exchange} />} />
<Route path={routes.root} element={<Navigate to={routes.swap} />} />
</Routes>
</AppScreen>
</BrowserRouter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ import { routes } from '../../../../../constants/routes'

export function MobileBreadcrumbs() {
const { t } = useTranslation()
const matchExchange = useMatch(routes.exchange)
const matchStaking = useMatch(routes.staking)
const matchExchange = useMatch(routes.swap)
const matchStaking = useMatch(routes.earn)

return (
<ul className={classNames.container}>
<Link to={routes.exchange} className={classNames.link}>
<Link to={routes.swap} className={classNames.link}>
<Button variant={'black'} className={`${classNames.listButton} ${matchExchange ? classNames.active : ''}`}>
<h5>{t('header.exchange')}</h5>
</Button>
</Link>
<Link to={routes.staking} className={classNames.link}>
<Link to={routes.earn} className={classNames.link}>
<Button variant={'black'} className={`${classNames.listButton} ${matchStaking ? classNames.active : ''}`}>
<h5>{t('header.staking')}</h5>
</Button>
Expand Down
8 changes: 4 additions & 4 deletions src/components/layout/Header/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ interface HeaderProps {
export const Header: FC<HeaderProps> = ({ children }) => {
const [isFeedbackModalOpened, setIsFeedbackModalOpened] = useState(false)
const isMobile = useMediaQuery('mobile')
const matchExchange = useMatch(routes.exchange)
const matchStaking = useMatch(routes.staking)
const matchExchange = useMatch(routes.swap)
const matchStaking = useMatch(routes.earn)
const { t } = useTranslation()

const handleHelpButtonClick = () => {
Expand All @@ -46,10 +46,10 @@ export const Header: FC<HeaderProps> = ({ children }) => {
</div>
{!isMobile ? (
<ul>
<Link className={matchExchange ? classNames.active : classNames.link} to={routes.exchange}>
<Link className={matchExchange ? classNames.active : classNames.link} to={routes.swap}>
{t('header.exchange')}
</Link>
<Link className={matchStaking ? classNames.active : classNames.link} to={routes.staking}>
<Link className={matchStaking ? classNames.active : classNames.link} to={routes.earn}>
{t('header.staking')}
</Link>
{ComingSoon}
Expand Down
4 changes: 2 additions & 2 deletions src/constants/routes.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export const routes = {
home: '/',
root: '/',
exchange: '/exchange',
swap: '/swap',
auth: '/auth',
login: '/login',
signup: '/signup',
profile: '/profile',
staking: '/staking',
earn: '/earn',
portfolio: '/portfolio',
notFound: '/404',
resetPassword: '/reset-password',
Expand Down

0 comments on commit dd3fe73

Please sign in to comment.