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> <AppLayout>
<Suspense fallback={<Spinner size="large" tip="Loading..." />}> <Suspense fallback={<Spinner size="large" tip="Loading..." />}>
<Switch> <Switch>
{routes.map(({ path, component, exact }) => { {routes.map(({ path, component, exact }, index) => (
return ( <Route key={index} exact={exact} path={path} component={component} />
<Route key={path} exact={exact} path={path} component={component} /> ))}
);
})}
<Redirect from="/" to={ROUTES.APPLICATION} /> <Redirect from="/" to={ROUTES.APPLICATION} />
<Route component={NotFound} /> <Route component={NotFound} />
</Switch> </Switch>