From 53726ad8eb15c0905773afbdf26e7c36f9ef378a Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Fri, 6 Dec 2024 03:53:30 +0100 Subject: [PATCH] layout component started --- package.json | 1 + src/component/auth/Forgetpwd2.jsx | 4 +-- src/component/auth/Login2.jsx | 4 +-- src/component/auth/Signup2.jsx | 4 +-- src/component/authorization/UserExist.jsx | 6 ++++- src/component/home/Home.jsx | 20 +++----------- src/component/layout/Layout.jsx | 27 +++++++++++++++++++ src/index.js | 1 + src/parts/UserHeader.jsx | 10 +++---- src/parts/UserMenu.jsx | 33 ++++++++++++----------- 10 files changed, 66 insertions(+), 44 deletions(-) create mode 100644 src/component/layout/Layout.jsx diff --git a/package.json b/package.json index d8837dc..faf5625 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { + "@popperjs/core": "^2.11.8", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", diff --git a/src/component/auth/Forgetpwd2.jsx b/src/component/auth/Forgetpwd2.jsx index ecbef92..1393e99 100644 --- a/src/component/auth/Forgetpwd2.jsx +++ b/src/component/auth/Forgetpwd2.jsx @@ -36,7 +36,7 @@ export default function Forgetpwd2() {

Recover Password

Please enter your email.

-
+
@@ -45,7 +45,7 @@ export default function Forgetpwd2() {
- +

Go Back

diff --git a/src/component/auth/Login2.jsx b/src/component/auth/Login2.jsx index 19fdc61..32cf313 100644 --- a/src/component/auth/Login2.jsx +++ b/src/component/auth/Login2.jsx @@ -36,7 +36,7 @@ export default function Login() {

MERMS Panel

Welcome back, please login to your account.

- +
@@ -62,7 +62,7 @@ export default function Login() {
- +

Don't have an account ? Sign Up

diff --git a/src/component/auth/Signup2.jsx b/src/component/auth/Signup2.jsx index 6493cb3..f79415f 100644 --- a/src/component/auth/Signup2.jsx +++ b/src/component/auth/Signup2.jsx @@ -36,7 +36,7 @@ export default function Signup2() {

MERMS Panel

Welcome, Please create your account.

- +
@@ -77,7 +77,7 @@ export default function Signup2() {
- +

Already have an account ? Sign In

diff --git a/src/component/authorization/UserExist.jsx b/src/component/authorization/UserExist.jsx index 5f99bef..b755fbd 100644 --- a/src/component/authorization/UserExist.jsx +++ b/src/component/authorization/UserExist.jsx @@ -1,6 +1,8 @@ import React, { useEffect, useState } from 'react' import { Outlet } from 'react-router-dom' import BSMainLoader from '../loaders/BSMainLoader' +import Layout from '../layout/Layout' + export default function UserExist() { @@ -19,7 +21,9 @@ export default function UserExist() { {loading ? : - + + + } ) diff --git a/src/component/home/Home.jsx b/src/component/home/Home.jsx index f86ece7..b96313a 100644 --- a/src/component/home/Home.jsx +++ b/src/component/home/Home.jsx @@ -7,22 +7,8 @@ import LoaderImage from "../../parts/LoaderImage"; export default function Home() { return ( -
-
- {/**/} - -
- -
-
- -
-
-
- -
-
+ <> + + ) } diff --git a/src/component/layout/Layout.jsx b/src/component/layout/Layout.jsx new file mode 100644 index 0000000..6795f2d --- /dev/null +++ b/src/component/layout/Layout.jsx @@ -0,0 +1,27 @@ +import React from 'react' +import UserMenu from "../../parts/UserMenu"; +import UserHeader from "../../parts/UserHeader"; +import UserFooter from "../../parts/UserFooter"; +import { Outlet } from 'react-router-dom'; + + +export default function Layout() { + return ( +
+
+ +
+ +
+
+ +
+
+
+ +
+
+ ) +} diff --git a/src/index.js b/src/index.js index 98aecf8..e405b18 100644 --- a/src/index.js +++ b/src/index.js @@ -5,6 +5,7 @@ import App from './App'; import { BrowserRouter } from 'react-router-dom'; //import reportWebVitals from './reportWebVitals'; import 'bootstrap/dist/css/bootstrap.css'; +// import 'bootstrap/dist/js/bootstrap.min.js' // import './custom.scss'; import './css/style.scss'; diff --git a/src/parts/UserHeader.jsx b/src/parts/UserHeader.jsx index fd9d524..c2def03 100644 --- a/src/parts/UserHeader.jsx +++ b/src/parts/UserHeader.jsx @@ -254,7 +254,7 @@ export default function UserHeader(){ {/*
*/} {/**/}
  • -
  • + Profile - + Inbox 6 - + Settings - + Need help?
    diff --git a/src/parts/UserMenu.jsx b/src/parts/UserMenu.jsx index 7142ef1..5ec0fa2 100644 --- a/src/parts/UserMenu.jsx +++ b/src/parts/UserMenu.jsx @@ -1,39 +1,42 @@ import React from 'react' +import { Link, useLocation } from 'react-router-dom' +import siteLinks from '../links/siteLinks' export default function UserMenu() { + const {pathname} = useLocation() return ( <>