1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-14 00:19:16 +01:00

Update messages in the dialogs for groups (#1208)

* Update messages

* Refinement
This commit is contained in:
sjaanus 2022-08-08 09:08:21 +03:00 committed by GitHub
parent c99470ec4e
commit c978ed6c6b
2 changed files with 11 additions and 12 deletions

View File

@ -47,23 +47,22 @@ export const RemoveGroupUser: FC<IRemoveGroupUserProps> = ({
} }
}; };
const userName = user?.name || user?.username || user?.email;
return ( return (
<Dialogue <Dialogue
open={open && Boolean(user)} open={open && Boolean(user)}
primaryButtonText="Remove" primaryButtonText="Remove user"
secondaryButtonText="Cancel" secondaryButtonText="Cancel"
onClick={onRemoveClick} onClick={onRemoveClick}
onClose={() => { onClose={() => {
setOpen(false); setOpen(false);
}} }}
title="Remove user from group" title="Remove user from group?"
> >
<Typography> <Typography>
Are you sure you wish to remove{' '} Do you really want to remove <strong>{userName}</strong> from{' '}
<strong>{user?.name || user?.username || user?.email}</strong>{' '} <strong>{group.name}</strong>? <strong>{userName}</strong> will
from <strong>{group.name}</strong>? Removing the user from this lose all access rights granted by this group.
group may also remove their access from projects this group is
assigned to.
</Typography> </Typography>
</Dialogue> </Dialogue>
); );

View File

@ -42,18 +42,18 @@ export const RemoveGroup: FC<IRemoveGroupProps> = ({
return ( return (
<Dialogue <Dialogue
open={open} open={open}
primaryButtonText="Remove" primaryButtonText="Delete group"
secondaryButtonText="Cancel" secondaryButtonText="Cancel"
onClick={onRemoveClick} onClick={onRemoveClick}
onClose={() => { onClose={() => {
setOpen(false); setOpen(false);
}} }}
title="Delete group" title="Delete group?"
> >
<Typography> <Typography>
Are you sure you wish to delete <strong>{group.name}</strong>? Do you really want to delete <strong>{group.name}</strong>?
If this group is currently assigned to one or more projects then Users who are granted access to projects only via this group
users belonging to this group may lose access to those projects. will lose access to those projects.
</Typography> </Typography>
</Dialogue> </Dialogue>
); );