2022-03-21 11:09:01 -07:00
|
|
|
import React from 'react';
|
|
|
|
import { FormattedMessage } from 'react-intl';
|
|
|
|
import { useDispatch } from 'react-redux';
|
|
|
|
|
|
|
|
import { openModal } from 'soapbox/actions/modals';
|
|
|
|
import { Button } from 'soapbox/components/ui';
|
|
|
|
|
|
|
|
const ComposeButton = () => {
|
|
|
|
const dispatch = useDispatch();
|
|
|
|
const onOpenCompose = () => dispatch(openModal('COMPOSE'));
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className='mt-4'>
|
2022-06-26 08:41:02 -07:00
|
|
|
<Button icon={require('@tabler/icons/icons/pencil-plus.svg')} block size='lg' onClick={onOpenCompose}>
|
2022-03-21 11:09:01 -07:00
|
|
|
<span><FormattedMessage id='navigation.compose' defaultMessage='Compose' /></span>
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default ComposeButton;
|