dry-wash-pl/src/routes.tsx

28 lines
912 B
TypeScript
Raw Normal View History

2024-11-10 02:45:54 +03:00
import React, { lazy, Suspense } from 'react';
import { Routes, Route } from 'react-router-dom';
2024-11-10 02:45:54 +03:00
import { PageSpinner } from './components';
import Arm from './pages/arm';
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>
<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;