Skip to content

Commit

Permalink
fix layout admin 1
Browse files Browse the repository at this point in the history
  • Loading branch information
tuongmt committed Nov 23, 2023
1 parent 1b96e59 commit 21cd1b3
Show file tree
Hide file tree
Showing 5 changed files with 3,328 additions and 1,610 deletions.
1 change: 0 additions & 1 deletion CNPMNC_2023/src/Admin/Admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
position: relative;
background: #ebe9e9;
width: 100%;
padding: 0.3rem;
}

.header--wrapper img {
Expand Down
11 changes: 9 additions & 2 deletions CNPMNC_2023/src/Admin/Admin.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
.admin{
.header_wrapper{
background-color: #0f3460;
padding: 10px 0;
color: #fff;
height: 80px;
}

.dashboard{

}
Expand Down Expand Up @@ -528,8 +535,8 @@

/* --user----- */

.page_admin h1 {
padding: 8px;
.page_admin h2 {
padding: 12px;
}

.username_logout {
Expand Down
50 changes: 21 additions & 29 deletions CNPMNC_2023/src/Admin/Components/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@

import React, { useState, useEffect } from "react";
import { Link, useHistory, Redirect } from "react-router-dom";


import NavDropdown from 'react-bootstrap/NavDropdown';


import NavDropdown from "react-bootstrap/NavDropdown";

export const Header = () => {
const history = useHistory();
Expand Down Expand Up @@ -39,38 +34,35 @@ export const Header = () => {

return (
<>
<div className="head d_flex">
<div className="header_wrapper d_flex">
<div className="page_admin">
<h1>Admin Page</h1>
<h2>TRANG CHỦ ADMIN</h2>
</div>
<div className="d_flex username_logout">
<h3>{user.fullName}</h3>


</div>
<div>
<h3>
<NavDropdown

title={<i className="fas fa-cogs" style={{background:"white"}}></i>}
id="basic-nav-dropdown"
>
<NavDropdown.Item >
<i className="fas fa-key mr-3"></i>
Đổi mật khẩu
</NavDropdown.Item>
<h3>
<NavDropdown
title={
<i className="fas fa-cogs" style={{ background: "white" }}></i>
}
id="basic-nav-dropdown"
>
<NavDropdown.Item>
<i className="fas fa-key mr-3"></i>
Đổi mật khẩu
</NavDropdown.Item>

<NavDropdown.Divider />
<NavDropdown.Divider />

<NavDropdown.Item onClick={handleLogout}>
<i className="fas fa-sign-out-alt mr-3"></i>
Đăng xuất
</NavDropdown.Item>
</NavDropdown>
</h3>
<NavDropdown.Item onClick={handleLogout}>
<i className="fas fa-sign-out-alt mr-3"></i>
Đăng xuất
</NavDropdown.Item>
</NavDropdown>
</h3>
</div>


</div>
</>
);
Expand Down
13 changes: 11 additions & 2 deletions CNPMNC_2023/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useState } from "react";

import "./App.css";
import * as React from "react";
import { Header } from "./common/header/Header";
Expand Down Expand Up @@ -135,16 +134,19 @@ function App() {
/>
<Footer />
</Route>

<Route path="/login-signup/Login" exact>
<Header cartItem={cartItem} />
<Login />
<Footer />
</Route>

<Route path="/login-signup/Signup" exact>
<Header cartItem={cartItem} />
<Signup />
<Footer />
</Route>

<Route path="/cart/Cart" exact>
<Header cartItem={cartItem} />
<Cart
Expand All @@ -156,26 +158,31 @@ function App() {
/>
<Footer />
</Route>

<Route path="/cart-login" exact>
<Header cartItem={cartItem} />
<CartLogin />
<Footer />
</Route>

<Route path="/profile/Profile" exact>
<Header cartItem={cartItem} />
<Profile />
<Footer />
</Route>

<Route path="/profile/ProfileUpdate" exact>
<Header cartItem={cartItem} />
<ProfileUpdate />
<Footer />
</Route>

<Route path="/profile/ChangePassword" exact>
<Header cartItem={cartItem} />
<ChangePassword />
<Footer />
</Route>

<Route path="/cart/Checkout" exact>
<Header cartItem={cartItem} />
<Order
Expand All @@ -185,7 +192,7 @@ function App() {
deleteProduct={deleteProduct}
/>
</Route>
<Footer />

<Route path="/profile/OrderHistory" exact>
<Header cartItem={cartItem} />
<OrderHistory />
Expand All @@ -207,11 +214,13 @@ function App() {
/>
<Footer />
</Route>

<Route path="/products">
<Header cartItem={cartItem} />
<Products productItems={productItems} addToCart={addToCart} />
<Footer />
</Route>

<Route path="/phone/:id">
<Header cartItem={cartItem} />
<Phone phoneItems={phoneItems} addToCart={addToCart} />
Expand Down
Loading

0 comments on commit 21cd1b3

Please sign in to comment.