From 49ec897205738b49b4d8bc8ca1ddcd09dc502a85 Mon Sep 17 00:00:00 2001 From: amir-kedis Date: Sat, 16 Dec 2023 13:12:58 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=8D=20Add=20react=20Router?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/package-lock.json | 26 +++++++++--------- client/package.json | 2 +- client/src/App.jsx | 13 +++------ client/src/components/testing/testTypo.jsx | 15 +++++++++++ client/src/routes.jsx | 31 ++++++++++++++++++++++ 5 files changed, 64 insertions(+), 23 deletions(-) create mode 100644 client/src/components/testing/testTypo.jsx diff --git a/client/package-lock.json b/client/package-lock.json index 589dc996..4a701afb 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -13,7 +13,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-redux": "^9.0.2", - "react-router-dom": "^6.20.1", + "react-router-dom": "^6.21.0", "sass": "^1.69.5" }, "devDependencies": { @@ -513,9 +513,9 @@ } }, "node_modules/@remix-run/router": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.13.1.tgz", - "integrity": "sha512-so+DHzZKsoOcoXrILB4rqDkMDy7NLMErRdOxvzvOKb507YINKUP4Di+shbTZDhSE/pBZ+vr7XGIpcOO0VLSA+Q==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.14.0.tgz", + "integrity": "sha512-WOHih+ClN7N8oHk9N4JUiMxQJmRVaOxcg8w7F/oHUXzJt920ekASLI/7cYX8XkntDWRhLZtsk6LbGrkgOAvi5A==", "engines": { "node": ">=14.0.0" } @@ -3088,11 +3088,11 @@ } }, "node_modules/react-router": { - "version": "6.20.1", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.20.1.tgz", - "integrity": "sha512-ccvLrB4QeT5DlaxSFFYi/KR8UMQ4fcD8zBcR71Zp1kaYTC5oJKYAp1cbavzGrogwxca+ubjkd7XjFZKBW8CxPA==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.21.0.tgz", + "integrity": "sha512-hGZ0HXbwz3zw52pLZV3j3+ec+m/PQ9cTpBvqjFQmy2XVUWGn5MD+31oXHb6dVTxYzmAeaiUBYjkoNz66n3RGCg==", "dependencies": { - "@remix-run/router": "1.13.1" + "@remix-run/router": "1.14.0" }, "engines": { "node": ">=14.0.0" @@ -3102,12 +3102,12 @@ } }, "node_modules/react-router-dom": { - "version": "6.20.1", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.20.1.tgz", - "integrity": "sha512-npzfPWcxfQN35psS7rJgi/EW0Gx6EsNjfdJSAk73U/HqMEJZ2k/8puxfwHFgDQhBGmS3+sjnGbMdMSV45axPQw==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.21.0.tgz", + "integrity": "sha512-1dUdVj3cwc1npzJaf23gulB562ESNvxf7E4x8upNJycqyUm5BRRZ6dd3LrlzhtLaMrwOCO8R0zoiYxdaJx4LlQ==", "dependencies": { - "@remix-run/router": "1.13.1", - "react-router": "6.20.1" + "@remix-run/router": "1.14.0", + "react-router": "6.21.0" }, "engines": { "node": ">=14.0.0" diff --git a/client/package.json b/client/package.json index 0865c9f7..027042e4 100644 --- a/client/package.json +++ b/client/package.json @@ -15,7 +15,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-redux": "^9.0.2", - "react-router-dom": "^6.20.1", + "react-router-dom": "^6.21.0", "sass": "^1.69.5" }, "devDependencies": { diff --git a/client/src/App.jsx b/client/src/App.jsx index 213c4a05..21c5571b 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -3,18 +3,13 @@ import "./theme.scss"; // Global Style (includes normalize.css) import "./assets/styles/global/global.scss"; +// Import Routes +import Routes from "./routes"; + function App() { return ( <> -

ما لا يدرك كله لا يترك جله

-

ما لا يدرك كله لا يترك جله

-

ما لا يدرك كله لا يترك جله

-

ما لا يدرك كله لا يترك جله

-
ما لا يدرك كله لا يترك جله
-
ما لا يدرك كله لا يترك جله
-

ما لا يدرك كله لا يترك جله

- ما لا يدرك كله لا يترك جله -

ما لا يدرك كله لا يترك جله

+ ); } diff --git a/client/src/components/testing/testTypo.jsx b/client/src/components/testing/testTypo.jsx new file mode 100644 index 00000000..0a11f439 --- /dev/null +++ b/client/src/components/testing/testTypo.jsx @@ -0,0 +1,15 @@ +export default function TestTypo() { + return ( + <> +

ما لا يدرك كله لا يترك جله

+

ما لا يدرك كله لا يترك جله

+

ما لا يدرك كله لا يترك جله

+

ما لا يدرك كله لا يترك جله

+
ما لا يدرك كله لا يترك جله
+
ما لا يدرك كله لا يترك جله
+

ما لا يدرك كله لا يترك جله

+ ما لا يدرك كله لا يترك جله +

ما لا يدرك كله لا يترك جله

+ + ); +} diff --git a/client/src/routes.jsx b/client/src/routes.jsx index e69de29b..454f74c1 100644 --- a/client/src/routes.jsx +++ b/client/src/routes.jsx @@ -0,0 +1,31 @@ +// routes.jsx is the main router for the application +// Will have the routes in it +import { + BrowserRouter as Router, + Routes as Switch, + Route, +} from "react-router-dom"; + +// Import modules/pages under this line + +// Import Testing Routes here +import TestTypo from "./components/testing/testTypo"; + +function Routes() { + return ( + + + Landing} /> + + {/* Testing Routes */} + {/* FIXME: Delete test routes Later */} + } /> + + {/* Not Found */} + Not Found} /> + + + ); +} + +export default Routes;