[FIX] Cancel button and success toast at Leave Team modal (#22373)

Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat>
pull/22332/head
gabriellsh 4 years ago committed by GitHub
parent 734d3b5c5f
commit 16520f1a98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      client/views/teams/contextualBar/info/Leave/StepTwo.js
  2. 1
      client/views/teams/contextualBar/info/TeamsInfoWithLogic.js
  3. 1
      packages/rocketchat-i18n/i18n/en.i18n.json

@ -13,10 +13,10 @@ export const StepTwo = ({ onConfirm, onCancel, onClose }) => {
variant='danger'
title={t('Confirmation')}
onConfirm={onConfirm}
onCancel={onCancel}
onCancel={onCancel || onClose}
onClose={onClose}
confirmText={t('Leave')}
cancelText={t('Back')}
cancelText={onCancel ? t('Back') : t('Cancel')}
>
{t('Teams_leaving_team')}
</GenericModal>

@ -87,6 +87,7 @@ function TeamsInfoWithLogic({ room, openEditing }) {
try {
await leaveTeam({ teamId: room.teamId, rooms });
dispatchToastMessage({ type: 'success', message: t('Teams_left_team_successfully') });
router.push({});
} catch (error) {
dispatchToastMessage({ type: 'error', message: error });

@ -3914,6 +3914,7 @@
"Teams_kept__username__channels": "You did not select the following Channels so __username__ will be kept on them:",
"Teams_leave_channels": "Select the Team’s Channels you would like to leave.",
"Teams_leave": "Leave Team",
"Teams_left_team_successfully": "Left the Team successfully",
"Teams_members": "Teams Members",
"Teams_New_Add_members_Label": "Add Members",
"Teams_New_Broadcast_Description": "Only authorized users can write new messages, but the other users will be able to reply",

Loading…
Cancel
Save