diff --git a/bro.config.js b/bro.config.js index f415f74..f3d23ca 100644 --- a/bro.config.js +++ b/bro.config.js @@ -9,7 +9,10 @@ module.exports = { }, /* use https://admin.bro-js.ru/ to create config, navigations and features */ navigations: { - "dry-wash-pl.main": "/dry-wash-pl", + "dry-wash.main": "/dry-wash", + "dry-wash.create": "/order", + "dry-wash.view.order": "/order/:orderId", + "dry-wash.arm": "/arm", }, features: { "dry-wash-pl": { diff --git a/package-lock.json b/package-lock.json index e789afc..739bc4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,8 @@ "@brojs/cli": "^1.3.0", "express": "^4.21.1", "react": "^18.3.1", - "react-dom": "^18.3.1" + "react-dom": "^18.3.1", + "react-router-dom": "^6.27.0" } }, "node_modules/@ampproject/remapping": { @@ -1869,6 +1870,14 @@ "node": ">=14" } }, + "node_modules/@remix-run/router": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.20.0.tgz", + "integrity": "sha512-mUnk8rPJBI9loFDZ+YzPGdeniYK+FTmRD1TMCz7ev2SNIozyKKpnGgsxO34u6Z4z/t0ITuu7voi/AshfsGsgFg==", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -5344,6 +5353,36 @@ } } }, + "node_modules/react-router": { + "version": "6.27.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.27.0.tgz", + "integrity": "sha512-YA+HGZXz4jaAkVoYBE98VQl+nVzI+cVI2Oj/06F5ZM+0u3TgedN9Y9kmMRo2mnkSK2nCpNQn0DVob4HCsY/WLw==", + "dependencies": { + "@remix-run/router": "1.20.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8" + } + }, + "node_modules/react-router-dom": { + "version": "6.27.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.27.0.tgz", + "integrity": "sha512-+bvtFWMC0DgAFrfKXKG9Fc+BcXWRUO1aJIihbB79xaeq0v5UzfvnM5houGUm1Y461WVRcgAQ+Clh5rdb1eCx4g==", + "dependencies": { + "@remix-run/router": "1.20.0", + "react-router": "6.27.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", diff --git a/package.json b/package.json index f08b6f3..eba8014 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@brojs/cli": "^1.3.0", "express": "^4.21.1", "react": "^18.3.1", - "react-dom": "^18.3.1" + "react-dom": "^18.3.1", + "react-router-dom": "^6.27.0" } } diff --git a/src/app.tsx b/src/app.tsx index aa2b95c..a6e14fd 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -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 ( -

Сухой мастер

+ + + ); }; -export default App; \ No newline at end of file +export default App; diff --git a/src/pages/arm/index.tsx b/src/pages/arm/index.tsx new file mode 100644 index 0000000..de2160b --- /dev/null +++ b/src/pages/arm/index.tsx @@ -0,0 +1,7 @@ +import React from "react"; + +const Page = () => { + return

Arm

; +}; + +export default Page; diff --git a/src/pages/landing/index.tsx b/src/pages/landing/index.tsx new file mode 100644 index 0000000..96ee58e --- /dev/null +++ b/src/pages/landing/index.tsx @@ -0,0 +1,7 @@ +import React from "react"; + +const Page = () => { + return

Landing

; +}; + +export default Page; diff --git a/src/pages/order-form/index.tsx b/src/pages/order-form/index.tsx new file mode 100644 index 0000000..beba6a6 --- /dev/null +++ b/src/pages/order-form/index.tsx @@ -0,0 +1,7 @@ +import React from "react"; + +const Page = () => { + return

Order form

; +}; + +export default Page; diff --git a/src/pages/order-view/index.tsx b/src/pages/order-view/index.tsx new file mode 100644 index 0000000..d032472 --- /dev/null +++ b/src/pages/order-view/index.tsx @@ -0,0 +1,7 @@ +import React from "react"; + +const Page = () => { + return

Order view

; +}; + +export default Page; diff --git a/src/routes.tsx b/src/routes.tsx new file mode 100644 index 0000000..b272319 --- /dev/null +++ b/src/routes.tsx @@ -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 ( + + }> + }> + }> + + ); +}; + +export default Routers;