fix(FE): app routes type is updated (#383)

This commit is contained in:
pal-sig 2021-11-22 12:19:17 +05:30 committed by GitHub
parent 20879dcf2e
commit 73b5134971
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,11 +13,9 @@ const App = (): JSX.Element => (
<AppLayout>
<Suspense fallback={<Spinner size="large" tip="Loading..." />}>
<Switch>
{routes.map(({ path, component, exact }) => {
return (
<Route key={path} exact={exact} path={path} component={component} />
);
})}
{routes.map(({ path, component, exact }, index) => (
<Route key={index} exact={exact} path={path} component={component} />
))}
<Redirect from="/" to={ROUTES.APPLICATION} />
<Route component={NotFound} />
</Switch>