diff --git a/frontend/src/components/util.tsx b/frontend/src/components/util.tsx index 741e42c65..cfc4b6266 100644 --- a/frontend/src/components/util.tsx +++ b/frontend/src/components/util.tsx @@ -167,9 +167,9 @@ export const ConfirmButton = ({ }: { title: string; icon: ReactNode; + onClick: () => void; intent?: ButtonProps["intent"]; disabled?: boolean; - onClick?: () => void; }) => { const [confirmed, set] = useState(false); @@ -180,7 +180,14 @@ export const ConfirmButton = ({ icon={confirmed ? : icon} intent={intent} disabled={disabled} - onClick={confirmed ? onClick : () => set(true)} + onClick={ + confirmed + ? () => { + onClick(); + set(false); + } + : () => set(true) + } className={confirmed ? "z-50" : ""} /> {confirmed && (