mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 10:10:08 +02:00
Merge pull request #26567 from overleaf/ae-modal-onconfirm
Remove onConfirm from modal props GitOrigin-RevId: 96c6456a0e893aeb544f346c0de3cb2c207f40d4
This commit is contained in:
committed by
Copybot
parent
77d5c8fa64
commit
169e37cf31
@@ -25,10 +25,10 @@ function GenericConfirmModal({
|
||||
message,
|
||||
confirmLabel,
|
||||
primaryVariant = 'primary',
|
||||
onConfirm,
|
||||
...modalProps
|
||||
}: GenericConfirmModalProps) {
|
||||
const { t } = useTranslation()
|
||||
const handleConfirmClick = modalProps.onConfirm
|
||||
|
||||
return (
|
||||
<OLModal {...modalProps}>
|
||||
@@ -42,7 +42,7 @@ function GenericConfirmModal({
|
||||
<OLButton variant="secondary" onClick={() => modalProps.onHide()}>
|
||||
{t('cancel')}
|
||||
</OLButton>
|
||||
<OLButton variant={primaryVariant} onClick={handleConfirmClick}>
|
||||
<OLButton variant={primaryVariant} onClick={onConfirm}>
|
||||
{confirmLabel || t('ok')}
|
||||
</OLButton>
|
||||
</OLModalFooter>
|
||||
|
||||
Reference in New Issue
Block a user