fix typo notification message

This commit is contained in:
Aashish-Upadhyay-101
2023-03-30 01:08:30 +05:45
parent c9e12d33bd
commit 91c83e04be
@@ -52,7 +52,7 @@ export const OrgSettingsPage = () => {
const addIncidentContact = useAddIncidentContact(); const addIncidentContact = useAddIncidentContact();
const removeIncidentContact = useDeleteIncidentContact(); const removeIncidentContact = useDeleteIncidentContact();
const [completeInviteLink, setcompleteInviteLink] = useState<string|undefined>("") const [completeInviteLink, setcompleteInviteLink] = useState<string | undefined>('');
const isMoreUsersNotAllowed = const isMoreUsersNotAllowed =
(orgUsers || []).length >= 5 && (orgUsers || []).length >= 5 &&
@@ -84,7 +84,7 @@ export const OrgSettingsPage = () => {
try { try {
await removeUserOrgMembership.mutateAsync({ orgId: currentOrg?._id, membershipId }); await removeUserOrgMembership.mutateAsync({ orgId: currentOrg?._id, membershipId });
createNotification({ createNotification({
text: 'Successfully removed used from org', text: 'Successfully removed user from org',
type: 'success' type: 'success'
}); });
} catch (error) { } catch (error) {
@@ -99,11 +99,14 @@ export const OrgSettingsPage = () => {
if (!currentOrg?._id) return; if (!currentOrg?._id) return;
try { try {
const {data} = await addUserToOrg.mutateAsync({ organizationId: currentOrg?._id, inviteeEmail: email }); const { data } = await addUserToOrg.mutateAsync({
setcompleteInviteLink(data?.completeInviteLink) organizationId: currentOrg?._id,
inviteeEmail: email
});
setcompleteInviteLink(data?.completeInviteLink);
// only show this notification when email is configured. A [completeInviteLink] will not be sent if smtp is configured // only show this notification when email is configured. A [completeInviteLink] will not be sent if smtp is configured
if (!data.completeInviteLink){ if (!data.completeInviteLink) {
createNotification({ createNotification({
text: 'Successfully invited user to the organization.', text: 'Successfully invited user to the organization.',
type: 'success' type: 'success'