From 4606c42c7a39daf3ee2cec24188c4d516d47985d Mon Sep 17 00:00:00 2001 From: Quy_FE Date: Mon, 28 Apr 2025 17:20:06 +0700 Subject: [PATCH] =?UTF-8?q?Feat=20:=20n=C3=BAt=20quay=20l=E1=BA=A1i?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/_components/Header/index.js | 15 ++++++++++++++- src/_screens/home/headmaster/index.js | 10 +--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/_components/Header/index.js b/src/_components/Header/index.js index de3a77b..d3aafe1 100644 --- a/src/_components/Header/index.js +++ b/src/_components/Header/index.js @@ -1,8 +1,11 @@ import { useSelector } from "react-redux"; import "./header.style.scss"; import { configConstants } from "../../_constants"; +import PrimaryButton from "../Button/PrimaryButton"; +import { renderIconButtonLeft } from "../renderIcon"; +import { history } from "../../_helpers"; -export default function Header({ icon, title, subtitles = [],manager=false }) { +export default function Header({ icon, title, subtitles = [], manager = false, isBack = false }) { const authentication = useSelector((state) => state.authentication); const { fullname, organization_name, role } = authentication?.user || {}; const hasFullName = fullname || organization_name; @@ -23,6 +26,16 @@ export default function Header({ icon, title, subtitles = [],manager=false }) { return (
+ {isBack && ( +
+ { + history.goBack() + }}> +
{renderIconButtonLeft()}
+ Quay lại +
+
+ )} {icon}

{title} diff --git a/src/_screens/home/headmaster/index.js b/src/_screens/home/headmaster/index.js index a2e5bed..d1bd908 100644 --- a/src/_screens/home/headmaster/index.js +++ b/src/_screens/home/headmaster/index.js @@ -254,19 +254,11 @@ export default function HeadmasterHome() {

- {authentication.user.role ==='supper_admin' &&( -
- { - history.goBack() - }}> - Quay lại - -
- )}

Mức độ hoàn thành của trường