This commit is contained in:
Laux Dev
2026-03-06 09:02:55 +08:00
parent b3f7427e95
commit 7b7b15738b
3 changed files with 26 additions and 11 deletions

View File

@@ -37,8 +37,9 @@ const TopHeader = (props) => {
{triggerAlert && (
<Alert
setTriggerAlert={setTriggerAlert}
onClick={() => setEditState(true)}
title={props.topbarTitle}
setEditState={setEditState}
title={!editState ? props.topbarTitle : "Save Changes"}
body="You are about to save the changes. Do you want to continue?"
/>
)}
<div className={styles.container}>
@@ -91,7 +92,9 @@ const TopHeader = (props) => {
text="Save"
form="form"
type="submit"
/* onClick={() => setTriggerAlert(!triggerAlert)} */
onClick={() =>
editState ? setTriggerAlert(!triggerAlert) : ""
}
icon={<CheckIcon width={20} height={20} />}
/>