(fix:config) use default variant for confirm modal

This commit is contained in:
ManishMadan2882
2025-05-24 01:19:54 +05:30
parent 2d55b1f592
commit 4b66ddfdef

View File

@@ -421,18 +421,10 @@ export default function ToolConfig({
})}
modalState="ACTIVE"
setModalState={(state) => setShowUnsavedModal(state === 'ACTIVE')}
submitLabel={t('settings.tools.leaveWithoutSaving', {
defaultValue: 'Leave without Saving',
})}
handleSubmit={() => {
setShowUnsavedModal(false);
handleGoBack();
}}
cancelLabel={t('settings.tools.saveAndLeave', {
submitLabel={t('settings.tools.saveAndLeave', {
defaultValue: 'Save and Leave',
})}
handleCancel={() => {
// First save changes, then go back
handleSubmit={() => {
userService
.updateTool(
{
@@ -455,7 +447,13 @@ export default function ToolConfig({
handleGoBack();
});
}}
variant="danger"
cancelLabel={t('settings.tools.leaveWithoutSaving', {
defaultValue: 'Leave without Saving',
})}
handleCancel={() => {
setShowUnsavedModal(false);
handleGoBack();
}}
/>
)}
</div>