From 7373209c1bfa63a69ab5a544876f37acfc0c4a13 Mon Sep 17 00:00:00 2001 From: Olamilekan Date: Sun, 27 Aug 2023 16:58:27 +0100 Subject: [PATCH 1/2] Fix issue #23: Created a user login page --- index.jsx | 19 ++-- package-lock.json | 63 ++++++++++++- package.json | 3 +- public/undraw_for_sale_re_egkk.svg | 1 + src/App.jsx | 21 ++--- src/pages/Home.jsx | 19 ++++ src/pages/Login.jsx | 138 +++++++++++++++++++++++++++++ src/pages/index.js | 2 + 8 files changed, 241 insertions(+), 25 deletions(-) create mode 100644 public/undraw_for_sale_re_egkk.svg create mode 100644 src/pages/Home.jsx create mode 100644 src/pages/Login.jsx create mode 100644 src/pages/index.js diff --git a/index.jsx b/index.jsx index eb9444f3..c80b5812 100644 --- a/index.jsx +++ b/index.jsx @@ -1,10 +1,13 @@ -import React from 'react' -import ReactDOM from 'react-dom/client' -import App from './src/App.jsx' -import './index.css' +import React from "react"; +import ReactDOM from "react-dom/client"; +import { BrowserRouter } from "react-router-dom"; +import "./index.css"; +import App from "./src/App.jsx"; -ReactDOM.createRoot(document.getElementById('root')).render( +ReactDOM.createRoot(document.getElementById("root")).render( - - , -) + + + + +); diff --git a/package-lock.json b/package-lock.json index af9ab911..5ccb3a3a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,8 @@ "prop-types": "^15.8.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-icons": "^4.10.1" + "react-icons": "^4.10.1", + "react-router-dom": "^6.15.0" }, "devDependencies": { "@types/react": "^18.2.14", @@ -937,6 +938,14 @@ "node": ">= 8" } }, + "node_modules/@remix-run/router": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.8.0.tgz", + "integrity": "sha512-mrfKqIHnSZRyIzBcanNJmVQELTnX+qagEDlcKO90RgRBVOZGSGvZKeDihTRfWcqoDn5N/NkUcwWTccnpN18Tfg==", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@types/prop-types": { "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", @@ -3510,6 +3519,36 @@ "node": ">=0.10.0" } }, + "node_modules/react-router": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.15.0.tgz", + "integrity": "sha512-NIytlzvzLwJkCQj2HLefmeakxxWHWAP+02EGqWEZy+DgfHHKQMUoBBjUQLOtFInBMhWtb3hiUy6MfFgwLjXhqg==", + "dependencies": { + "@remix-run/router": "1.8.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8" + } + }, + "node_modules/react-router-dom": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.15.0.tgz", + "integrity": "sha512-aR42t0fs7brintwBGAv2+mGlCtgtFQeOzK0BM1/OiqEzRejOZtpMZepvgkscpMUnKb8YO84G7s3LsHnnDNonbQ==", + "dependencies": { + "@remix-run/router": "1.8.0", + "react-router": "6.15.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -4841,6 +4880,11 @@ "fastq": "^1.6.0" } }, + "@remix-run/router": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.8.0.tgz", + "integrity": "sha512-mrfKqIHnSZRyIzBcanNJmVQELTnX+qagEDlcKO90RgRBVOZGSGvZKeDihTRfWcqoDn5N/NkUcwWTccnpN18Tfg==" + }, "@types/prop-types": { "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", @@ -6612,6 +6656,23 @@ "integrity": "sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==", "dev": true }, + "react-router": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.15.0.tgz", + "integrity": "sha512-NIytlzvzLwJkCQj2HLefmeakxxWHWAP+02EGqWEZy+DgfHHKQMUoBBjUQLOtFInBMhWtb3hiUy6MfFgwLjXhqg==", + "requires": { + "@remix-run/router": "1.8.0" + } + }, + "react-router-dom": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.15.0.tgz", + "integrity": "sha512-aR42t0fs7brintwBGAv2+mGlCtgtFQeOzK0BM1/OiqEzRejOZtpMZepvgkscpMUnKb8YO84G7s3LsHnnDNonbQ==", + "requires": { + "@remix-run/router": "1.8.0", + "react-router": "6.15.0" + } + }, "read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", diff --git a/package.json b/package.json index 72a5e20e..4e665ef2 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "prop-types": "^15.8.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-icons": "^4.10.1" + "react-icons": "^4.10.1", + "react-router-dom": "^6.15.0" }, "devDependencies": { "@types/react": "^18.2.14", diff --git a/public/undraw_for_sale_re_egkk.svg b/public/undraw_for_sale_re_egkk.svg new file mode 100644 index 00000000..e693e620 --- /dev/null +++ b/public/undraw_for_sale_re_egkk.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/App.jsx b/src/App.jsx index 69f4db4a..54b6e70d 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,22 +1,13 @@ +import { Route, Routes } from "react-router-dom"; import "./App.css"; -import Contact from "./components/Contact-section/Contact"; -import Header from "./components/Header-section/Header"; -import Footer from "./components/Footer-section/Footer"; -import AboutUs from "./components/AboutUs-section/AboutUs"; -import Services from "./components/Services-section/Services-section"; -import Testimonial from "./components/testimonial-section/Testimonial"; - +import { Home, Login } from "./pages"; const App = () => { return ( - <> -
- - - - -