Remove the ability to 'Report chat' from Intro

This commit is contained in:
Justin 2022-10-04 11:00:07 -04:00
parent 3a74496c35
commit e8ffa13629

View file

@ -3,7 +3,6 @@ import React from 'react';
import { defineMessages, useIntl } from 'react-intl';
import { openModal } from 'soapbox/actions/modals';
import { initReport } from 'soapbox/actions/reports';
import Link from 'soapbox/components/link';
import { Avatar, Button, HStack, Icon, Stack, Text } from 'soapbox/components/ui';
import { useChatContext } from 'soapbox/contexts/chat-context';
@ -38,11 +37,6 @@ const ChatMessageListIntro = () => {
}));
};
const handleReportChat = () => {
dispatch(initReport(chat?.account as any));
acceptChat.mutate();
};
if (!chat) {
return null;
}
@ -81,7 +75,7 @@ const ChatMessageListIntro = () => {
</Stack>
{needsAcceptance ? (
<Stack space={2} className='w-full'>
<HStack alignItems='center' space={2} className='w-full'>
<Button
theme='primary'
block
@ -91,24 +85,14 @@ const ChatMessageListIntro = () => {
{intl.formatMessage(messages.accept)}
</Button>
<HStack alignItems='center' space={2} className='w-full'>
<Button
theme='secondary'
block
onClick={handleReportChat}
>
{intl.formatMessage(messages.report)}
</Button>
<Button
theme='danger'
block
onClick={handleLeaveChat}
>
{intl.formatMessage(messages.leaveChat)}
</Button>
</HStack>
</Stack>
<Button
theme='danger'
block
onClick={handleLeaveChat}
>
{intl.formatMessage(messages.leaveChat)}
</Button>
</HStack>
) : (
<HStack justifyContent='center' alignItems='center' space={1} className='flex-shrink-0'>
<Icon src={require('@tabler/icons/clock.svg')} className='text-gray-600 w-4 h-4' />