2022-03-21 11:09:01 -07:00
|
|
|
import React from 'react';
|
|
|
|
import { FormattedMessage } from 'react-intl';
|
|
|
|
|
|
|
|
import { openModal } from 'soapbox/actions/modals';
|
|
|
|
import { Button } from 'soapbox/components/ui';
|
2023-01-27 14:04:42 -08:00
|
|
|
import { useAppDispatch } from 'soapbox/hooks';
|
2022-03-21 11:09:01 -07:00
|
|
|
|
|
|
|
const ComposeButton = () => {
|
2023-01-27 14:04:42 -08:00
|
|
|
const dispatch = useAppDispatch();
|
2022-03-21 11:09:01 -07:00
|
|
|
const onOpenCompose = () => dispatch(openModal('COMPOSE'));
|
|
|
|
|
|
|
|
return (
|
2022-12-23 13:22:41 -08:00
|
|
|
<Button
|
|
|
|
theme='accent'
|
|
|
|
icon={require('@tabler/icons/pencil-plus.svg')}
|
|
|
|
size='lg'
|
|
|
|
onClick={onOpenCompose}
|
|
|
|
block
|
|
|
|
>
|
|
|
|
<FormattedMessage id='navigation.compose' defaultMessage='Compose' />
|
|
|
|
</Button>
|
2022-03-21 11:09:01 -07:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default ComposeButton;
|