Convert ModalRoot to TSX+FC

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2022-10-01 15:37:54 +02:00
parent ce255b7ded
commit ff0b1b28ca
3 changed files with 214 additions and 236 deletions

View File

@@ -27,10 +27,8 @@ const ComposeModal: React.FC<IComposeModal> = ({ onClose }) => {
const { id: statusId, privacy, in_reply_to: inReplyTo, quote } = compose!;
const hasComposeContent = checkComposeContent(compose);
const onClickClose = () => {
if (hasComposeContent) {
if (checkComposeContent(compose)) {
dispatch(openModal('CONFIRM', {
icon: require('@tabler/icons/trash.svg'),
heading: statusId