pleroma/app/soapbox/features/chats/components/chat-page/components/blankslate-empty.tsx
2022-11-07 12:13:44 -05:00

46 lines
No EOL
1.3 KiB
TypeScript

import React from 'react';
import { FormattedMessage } from 'react-intl';
import { useHistory } from 'react-router-dom';
import { Button, Stack, Text } from 'soapbox/components/ui';
interface IBlankslate {
}
/** To display on the chats main page when no message is selected. */
const BlankslateEmpty: React.FC<IBlankslate> = () => {
const history = useHistory();
const handleNewChat = () => {
history.push('/chats/new');
};
return (
<Stack space={6} alignItems='center' justifyContent='center' className='p-6 h-full'>
<Stack space={2} className='max-w-sm'>
<Text size='2xl' weight='bold' tag='h2' align='center'>
<FormattedMessage
id='chats.main.blankslate.title'
defaultMessage='No messages yet'
/>
</Text>
<Text size='sm' theme='muted' align='center'>
<FormattedMessage
id='chats.main.blankslate.subtitle'
defaultMessage='You can start a chat with anyone that follows you'
/>
</Text>
</Stack>
<Button theme='primary' onClick={handleNewChat}>
<FormattedMessage
id='chats.main.blankslate.new_chat'
defaultMessage='Message someone'
/>
</Button>
</Stack>
);
};
export default BlankslateEmpty;