feat: add routing (#4)

This commit is contained in:
2024-10-27 16:07:03 +03:00
parent 855887079b
commit 693a7c5420
9 changed files with 98 additions and 6 deletions

View File

@@ -1,9 +1,13 @@
import React from 'react';
import React from "react";
import { BrowserRouter } from "react-router-dom";
import Routers from "./routes";
const App = () => {
return (
<h1>Сухой мастер </h1>
<BrowserRouter>
<Routers></Routers>
</BrowserRouter>
);
};
export default App;
export default App;

7
src/pages/arm/index.tsx Normal file
View File

@@ -0,0 +1,7 @@
import React from "react";
const Page = () => {
return <h1>Arm </h1>;
};
export default Page;

View File

@@ -0,0 +1,7 @@
import React from "react";
const Page = () => {
return <h1>Landing</h1>;
};
export default Page;

View File

@@ -0,0 +1,7 @@
import React from "react";
const Page = () => {
return <h1>Order form </h1>;
};
export default Page;

View File

@@ -0,0 +1,7 @@
import React from "react";
const Page = () => {
return <h1>Order view</h1>;
};
export default Page;

17
src/routes.tsx Normal file
View File

@@ -0,0 +1,17 @@
import React from "react";
import { Routes, Route } from "react-router-dom";
import Arm from "./pages/arm";
import Order from "./pages/order-view";
import Landing from "./pages/landing";
const Routers = () => {
return (
<Routes>
<Route path="/dry-wash-pl" element={<Landing />}></Route>
<Route path="/dry-wash-pl/order" element={<Order />}></Route>
<Route path="/dry-wash-pl/arm" element={<Arm />}></Route>
</Routes>
);
};
export default Routers;