Skip to content

Commit

Permalink
add callout
Browse files Browse the repository at this point in the history
  • Loading branch information
Dnouv committed Mar 21, 2023
1 parent dee7712 commit 08f7a4c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion apps/meteor/client/views/admin/moderation/UserMessages.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Message } from '@rocket.chat/fuselage';
import { Box, Callout, Message } from '@rocket.chat/fuselage';
import { useMutableCallback } from '@rocket.chat/fuselage-hooks';
import { useEndpoint, useRoute, useToastMessageDispatch, useTranslation } from '@rocket.chat/ui-contexts';
import { useQuery } from '@tanstack/react-query';
Expand Down Expand Up @@ -59,6 +59,9 @@ const UserMessages = ({

return (
<Box display='flex' flexDirection='column' width='full' height='full' overflowY='auto' overflowX='hidden'>
<Callout margin={15} title='Duplicate messages' type='warning' icon='lightning'>
Following may contain duplicated messages sent across channels
</Callout>{' '}
{isLoadingUserMessages && <Message>{t('Loading')}</Message>}
{isSuccessUserMessages &&
userMessages.messages.map((message) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ const useDeactivateUserAction = (userId: string, onChange: () => void, onReload:
});

const onDeactivateUser = async () => {
setModal();
await handleDeleteMessages.mutateAsync({ userId });
await handleDeactivateUser.mutateAsync({ userId, activeStatus: false });
onChange();
onReload();
setModal();
};

const confirmDeactivateUser = (): void => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ const useResetAvatarAction = (userId: string, onChange: () => void, onReload: ()
});

const onResetAvatar = async () => {
setModal();
await handleResetAvatar.mutateAsync({ userId });
await handleMarkAsChecked.mutateAsync({ userId });
onChange();
onReload();
setModal();
};

const confirmResetAvatar = (): void => {
Expand Down

0 comments on commit 08f7a4c

Please sign in to comment.