mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-19 16:19:45 -06:00
refactor: removing dupicity of onCancel and onClose
This commit is contained in:
@@ -7,7 +7,6 @@ const Dialog = ({
|
||||
title,
|
||||
description,
|
||||
open,
|
||||
onClose,
|
||||
theme,
|
||||
onCancel,
|
||||
confirmationButtonLabel,
|
||||
@@ -19,7 +18,7 @@ const Dialog = ({
|
||||
title={title}
|
||||
description={description}
|
||||
open={open}
|
||||
onClose={onClose}
|
||||
onClose={onCancel}
|
||||
theme={theme}
|
||||
>
|
||||
<Stack
|
||||
|
||||
@@ -374,7 +374,6 @@ const ProfilePanel = () => {
|
||||
|
||||
<Dialog
|
||||
open={isModalOpen("delete")}
|
||||
onClose={() => setIsOpen("")}
|
||||
theme={theme}
|
||||
title={"Really delete this account?"}
|
||||
description={
|
||||
|
||||
@@ -150,10 +150,6 @@ const ActionsMenu = ({ /* isAdmin, */ maintenanceWindow, updateCallback }) => {
|
||||
</Menu>
|
||||
<Dialog
|
||||
open={isOpen}
|
||||
onClose={(e) => {
|
||||
e.stopPropagation();
|
||||
setIsOpen(false);
|
||||
}}
|
||||
theme={theme}
|
||||
title={"Do you really want to remove this maintenance window?"}
|
||||
onCancel={(e) => {
|
||||
|
||||
@@ -456,7 +456,6 @@ const Configure = () => {
|
||||
|
||||
<Dialog
|
||||
open={isOpen}
|
||||
onClose={() => setIsOpen(false)}
|
||||
theme={theme}
|
||||
title="Do you really want to delete this monitor?"
|
||||
description="Once deleted, this monitor cannot be retrieved."
|
||||
|
||||
@@ -189,7 +189,6 @@ const ActionsMenu = ({ monitor, isAdmin, updateCallback }) => {
|
||||
</Menu>
|
||||
<Dialog
|
||||
open={isOpen}
|
||||
onClose={() => setIsOpen(false)}
|
||||
theme={theme}
|
||||
title="Do you really want to delete this monitor?"
|
||||
description="Once deleted, this monitor cannot be retrieved."
|
||||
|
||||
@@ -434,7 +434,6 @@ const PageSpeedConfigure = () => {
|
||||
)}
|
||||
<Dialog
|
||||
open={isOpen}
|
||||
onClose={() => setIsOpen(false)}
|
||||
theme={theme}
|
||||
title={"Do you really want to delete this monitor?"}
|
||||
description={"Once deleted, this monitor cannot be retrieved."}
|
||||
|
||||
@@ -264,7 +264,6 @@ const Settings = ({ isAdmin }) => {
|
||||
</Stack>
|
||||
<Dialog
|
||||
open={isOpen.deleteStats}
|
||||
onClose={() => setIsOpen(deleteStatsMonitorsInitState)}
|
||||
theme={theme}
|
||||
title="Do you want to clear all stats?"
|
||||
description="Once deleted, this monitor cannot be retrieved."
|
||||
@@ -313,7 +312,6 @@ const Settings = ({ isAdmin }) => {
|
||||
</Stack>
|
||||
<Dialog
|
||||
open={isOpen.deleteMonitors}
|
||||
onClose={() => setIsOpen(deleteStatsMonitorsInitState)}
|
||||
theme={theme}
|
||||
title="Do you want to remove all monitors?"
|
||||
onCancel={() => setIsOpen(deleteStatsMonitorsInitState)}
|
||||
|
||||
Reference in New Issue
Block a user