Skip to content

Commit

Permalink
fix: use route instead of redirect (#1507)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjeatt authored Aug 4, 2023
1 parent b98f7e2 commit 2e980d6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 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 { Redirect, Route, Switch } from 'react-router-dom';
import { Route, Switch } from 'react-router-dom';

import { isVaultClientLoaded } from '@/common/actions/general.actions';
import { StoreType } from '@/common/types/util.types';
Expand Down Expand Up @@ -95,7 +95,6 @@ const App = (): JSX.Element => {
<Route path={PAGES.VAULT}>
<Vaults />
</Route>

<Route path={PAGES.DASHBOARD}>
<Dashboard />
</Route>
Expand All @@ -120,7 +119,7 @@ const App = (): JSX.Element => {
<Route path={PAGES.POOLS}>
<Pools />
</Route>
<Route path={PAGES.WALLET}>
<Route path={[PAGES.HOME, PAGES.WALLET]}>
<Wallet />
</Route>
{isStrategiesEnabled && (
Expand All @@ -141,7 +140,6 @@ const App = (): JSX.Element => {
<Route path={PAGES.ACTIONS}>
<Actions />
</Route>
<Redirect exact from={PAGES.HOME} to={PAGES.WALLET} />
<Route path='*'>
<NoMatch />
</Route>
Expand Down

2 comments on commit 2e980d6

@vercel
Copy link

@vercel vercel bot commented on 2e980d6 Aug 4, 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 2e980d6 Aug 4, 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.