Skip to content

Commit

Permalink
refactor(app): refactor routes a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
heyqbnk committed Apr 1, 2024
1 parent 14e2da0 commit 30f0390
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/components/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@ import {

import { routes } from '~/navigation/routes.tsx';

const Inner: FC = () => {
return (
<Routes>
{routes.map((route) => <Route key={route.path} {...route} />)}
<Route path="*" element={<Navigate to="/" />} />
</Routes>
);
};

export const App: FC = () => {
const tmaNavigator = useMemo(createNavigator, []);
const [location, navigator] = useNavigatorIntegration(tmaNavigator);
Expand All @@ -32,7 +23,10 @@ export const App: FC = () => {

return (
<Router location={location} navigator={navigator}>
<Inner />
<Routes>
{routes.map((route) => <Route key={route.path} {...route} />)}
<Route path="*" element={<Navigate to="/" />} />
</Routes>
</Router>
);
};

0 comments on commit 30f0390

Please sign in to comment.