Skip to content

Commit

Permalink
fix: use redirect in route (#1533)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjeatt authored Aug 18, 2023
1 parent 5f60748 commit 9af1253
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as React from 'react';
import { useErrorHandler, withErrorBoundary } from 'react-error-boundary';
import { useQuery } from 'react-query';
import { useDispatch, useSelector } from 'react-redux';
import { Route, Switch } from 'react-router-dom';
import { Redirect, Route, Switch } from 'react-router-dom';

import { isVaultClientLoaded } from '@/common/actions/general.actions';
import { StoreType } from '@/common/types/util.types';
Expand Down Expand Up @@ -119,7 +119,7 @@ const App = (): JSX.Element => {
<Route path={PAGES.POOLS}>
<Pools />
</Route>
<Route path={[PAGES.HOME, PAGES.WALLET]}>
<Route path={PAGES.WALLET}>
<Wallet />
</Route>
{isStrategiesEnabled && (
Expand All @@ -140,6 +140,9 @@ const App = (): JSX.Element => {
<Route path={PAGES.ACTIONS}>
<Actions />
</Route>
<Route exact path={PAGES.HOME}>
<Redirect to={PAGES.WALLET} />
</Route>
<Route path='*'>
<NoMatch />
</Route>
Expand Down

2 comments on commit 9af1253

@vercel
Copy link

@vercel vercel bot commented on 9af1253 Aug 18, 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 9af1253 Aug 18, 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.