feat: add navigation keys and routing check (#24)

This commit is contained in:
RustamRu
2024-11-16 15:41:14 +03:00
parent 897602c471
commit bc629eabdf
9 changed files with 66 additions and 14 deletions

View File

@@ -2,6 +2,7 @@ import React, { lazy, Suspense } from 'react';
import { Routes, Route } from 'react-router-dom';
import { PageSpinner } from './components';
import Arm from './pages/arm';
import { URLs } from './__data__/urls';
const Landing = lazy(() => import('./pages/landing'));
const OrderForm = lazy(() => import('./pages/order-form'));
@@ -11,11 +12,9 @@ const Routers = () => {
return (
<Suspense fallback={<PageSpinner />}>
<Routes>
<Route path='/dry-wash'>
<Route index element={<Landing />} />
<Route path='order-form' element={<OrderForm />} />
<Route path='order-view' element={<OrderView />} />
</Route>
<Route path={URLs.landing.url} element={<Landing />} />
<Route path={URLs.orderForm.url} element={<OrderForm />} />
<Route path={URLs.orderView.url} element={<OrderView />} />
<Route path='/dry-wash/arm' element={<Arm />}></Route>
</Routes>
</Suspense>