2024-11-10 02:45:54 +03:00
|
|
|
import React, { lazy, Suspense } from 'react';
|
2024-11-03 11:44:23 +03:00
|
|
|
import { Routes, Route } from 'react-router-dom';
|
2024-11-17 13:46:24 +03:00
|
|
|
|
2024-11-10 02:45:54 +03:00
|
|
|
import { PageSpinner } from './components';
|
2024-11-03 11:44:23 +03:00
|
|
|
import Arm from './pages/arm';
|
2024-11-16 15:41:14 +03:00
|
|
|
import { URLs } from './__data__/urls';
|
2024-11-16 18:13:23 +03:00
|
|
|
import NotFound from './pages/notFound/notFound';
|
2024-11-10 02:45:54 +03:00
|
|
|
|
|
|
|
const Landing = lazy(() => import('./pages/landing'));
|
|
|
|
const OrderForm = lazy(() => import('./pages/order-form'));
|
|
|
|
const OrderView = lazy(() => import('./pages/order-view'));
|
2024-10-27 16:07:03 +03:00
|
|
|
|
|
|
|
const Routers = () => {
|
|
|
|
return (
|
2024-11-10 02:45:54 +03:00
|
|
|
<Suspense fallback={<PageSpinner />}>
|
|
|
|
<Routes>
|
2024-11-16 15:41:14 +03:00
|
|
|
<Route path={URLs.landing.url} element={<Landing />} />
|
|
|
|
<Route path={URLs.orderForm.url} element={<OrderForm />} />
|
|
|
|
<Route path={URLs.orderView.url} element={<OrderView />} />
|
2024-11-09 19:34:12 +03:00
|
|
|
<Route path='/dry-wash/arm/*' element={<Arm />}></Route>
|
2024-11-16 18:13:23 +03:00
|
|
|
<Route path='*' element={<NotFound />} />
|
2024-11-10 02:45:54 +03:00
|
|
|
</Routes>
|
|
|
|
</Suspense>
|
2024-10-27 16:07:03 +03:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Routers;
|