Remove the ability to 'Report chat' from Intro
This commit is contained in:
parent
3a74496c35
commit
e8ffa13629
|
@ -3,7 +3,6 @@ import React from 'react';
|
||||||
import { defineMessages, useIntl } from 'react-intl';
|
import { defineMessages, useIntl } from 'react-intl';
|
||||||
|
|
||||||
import { openModal } from 'soapbox/actions/modals';
|
import { openModal } from 'soapbox/actions/modals';
|
||||||
import { initReport } from 'soapbox/actions/reports';
|
|
||||||
import Link from 'soapbox/components/link';
|
import Link from 'soapbox/components/link';
|
||||||
import { Avatar, Button, HStack, Icon, Stack, Text } from 'soapbox/components/ui';
|
import { Avatar, Button, HStack, Icon, Stack, Text } from 'soapbox/components/ui';
|
||||||
import { useChatContext } from 'soapbox/contexts/chat-context';
|
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) {
|
if (!chat) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -81,7 +75,7 @@ const ChatMessageListIntro = () => {
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
{needsAcceptance ? (
|
{needsAcceptance ? (
|
||||||
<Stack space={2} className='w-full'>
|
<HStack alignItems='center' space={2} className='w-full'>
|
||||||
<Button
|
<Button
|
||||||
theme='primary'
|
theme='primary'
|
||||||
block
|
block
|
||||||
|
@ -91,15 +85,6 @@ const ChatMessageListIntro = () => {
|
||||||
{intl.formatMessage(messages.accept)}
|
{intl.formatMessage(messages.accept)}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<HStack alignItems='center' space={2} className='w-full'>
|
|
||||||
<Button
|
|
||||||
theme='secondary'
|
|
||||||
block
|
|
||||||
onClick={handleReportChat}
|
|
||||||
>
|
|
||||||
{intl.formatMessage(messages.report)}
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
theme='danger'
|
theme='danger'
|
||||||
block
|
block
|
||||||
|
@ -108,7 +93,6 @@ const ChatMessageListIntro = () => {
|
||||||
{intl.formatMessage(messages.leaveChat)}
|
{intl.formatMessage(messages.leaveChat)}
|
||||||
</Button>
|
</Button>
|
||||||
</HStack>
|
</HStack>
|
||||||
</Stack>
|
|
||||||
) : (
|
) : (
|
||||||
<HStack justifyContent='center' alignItems='center' space={1} className='flex-shrink-0'>
|
<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' />
|
<Icon src={require('@tabler/icons/clock.svg')} className='text-gray-600 w-4 h-4' />
|
||||||
|
|
Loading…
Reference in New Issue