From 2fbac4600c74fa23f3280a9d8aa716592a1d9590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Thu, 7 Apr 2022 21:20:50 +0200 Subject: [PATCH] MissingDescriptionModal to functional component MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../components/missing_description_modal.tsx | 51 +++++++------------ 1 file changed, 18 insertions(+), 33 deletions(-) diff --git a/app/soapbox/features/ui/components/missing_description_modal.tsx b/app/soapbox/features/ui/components/missing_description_modal.tsx index 53fe240d0..8268ff3e8 100644 --- a/app/soapbox/features/ui/components/missing_description_modal.tsx +++ b/app/soapbox/features/ui/components/missing_description_modal.tsx @@ -10,41 +10,26 @@ const messages = defineMessages({ }); interface IMissingDescriptionModal { - onClose: Function, - onContinue: Function, + onClose: () => void, + onContinue: () => void, intl: IntlShape, } -class MissingDescriptionModal extends React.PureComponent { - - handleContinue = () => { - this.props.onClose(); - this.props.onContinue(); - } - - handleCancel = () => { - this.props.onClose(); - } - - render() { - const { intl } = this.props; - - return ( - -

- -

-
- ); - } - -} +const MissingDescriptionModal: React.FC = ({ onClose, onContinue, intl }) => { + return ( + +

+ +

+
+ ); +}; export default injectIntl(MissingDescriptionModal);