Skip to content

Commit

Permalink
Update routes (#1442)
Browse files Browse the repository at this point in the history
* update routes

* redirect crossChainTransfer query parameter

* fix redirect syntax

* fix redirect syntax

* redirect cross chain transfer

* tab redirects

* correct redirect syntax
  • Loading branch information
tomjeatt authored Jul 10, 2023
1 parent 2d67c92 commit 9c16ae5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import * as constants from './constants';
import TestnetBanner from './legacy-components/TestnetBanner';
import { FeatureFlags, useFeatureFlag } from './utils/hooks/use-feature-flag';

const BTC = React.lazy(() => import(/* webpackChunkName: 'bridge' */ '@/pages/BTC'));
const BTC = React.lazy(() => import(/* webpackChunkName: 'btc' */ '@/pages/BTC'));
const Strategies = React.lazy(() => import(/* webpackChunkName: 'strategies' */ '@/pages/Strategies'));
const SendAndReceive = React.lazy(() => import(/* webpackChunkName: 'transfer' */ '@/pages/SendAndReceive'));
const SendAndReceive = React.lazy(() => import(/* webpackChunkName: 'sendAndReceive' */ '@/pages/SendAndReceive'));
const TX = React.lazy(() => import(/* webpackChunkName: 'tx' */ '@/pages/TX'));
const Staking = React.lazy(() => import(/* webpackChunkName: 'staking' */ '@/pages/Staking'));
const Dashboard = React.lazy(() => import(/* webpackChunkName: 'dashboard' */ '@/pages/Dashboard'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const SendAndReceiveForms = (): JSX.Element => {
<TransferForm />
</StyledFormWrapper>
</TabsItem>
<TabsItem title='Bridge' key='crossChainTransfer'>
<TabsItem title='Bridge' key='bridge'>
<StyledFormWrapper>
<BridgeForm />
</StyledFormWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const ActionsCell = ({
to={{
pathname: PAGES.SEND_AND_RECEIVE,
search: queryString.stringify({
[QUERY_PARAMETERS.TAB]: 'crossChainTransfer'
[QUERY_PARAMETERS.TAB]: 'bridge'
})
}}
>
Expand Down
4 changes: 2 additions & 2 deletions src/utils/constants/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ const URL_PARAMETERS = Object.freeze({

const PAGES = Object.freeze({
HOME: '/',
BTC: '/bridge',
BTC: '/btc',
STRATEGIES: '/strategies',
SEND_AND_RECEIVE: '/transfer',
SEND_AND_RECEIVE: '/send-and-receive',
TX: '/tx',
STAKING: '/staking',
DASHBOARD: '/dashboard',
Expand Down
10 changes: 10 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,15 @@
}
]
}
],
"redirects": [
{
"source": "/bridge",
"destination": "/btc"
},
{
"source": "/transfer",
"destination": "/send-and-receive"
}
]
}

2 comments on commit 9c16ae5

@vercel
Copy link

@vercel vercel bot commented on 9c16ae5 Jul 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 9c16ae5 Jul 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.