-
-
- {this.props.t('UploadFileModal.Title')}
-
-
-
- {this.props.reachedTotalSizeLimit && (
-
- {this.props.t('UploadFileModal.SizeLimitError', {
- sizeLimit: limitText
- })}
-
- assets
-
- .
-
- )}
- {!this.props.reachedTotalSizeLimit && (
-
-
-
- )}
+const UploadFileModal = () => {
+ const { t } = useTranslation();
+ const dispatch = useDispatch();
+ const reachedTotalSizeLimit = useSelector(getreachedTotalSizeLimit);
+ const onClose = () => dispatch(closeUploadFileModal());
+ return (
+
+ {reachedTotalSizeLimit ? (
+
+ {t('UploadFileModal.SizeLimitError', {
+ sizeLimit: limitText
+ })}
+
+ assets
+
+ .
+
+ ) : (
+
+
-
- );
- }
-}
-
-function mapStateToProps(state) {
- return {
- reachedTotalSizeLimit: getreachedTotalSizeLimit(state)
- };
-}
+ )}
+
+ );
+};
-export default withTranslation()(connect(mapStateToProps)(UploadFileModal));
+export default UploadFileModal;
diff --git a/client/modules/IDE/pages/IDEView.jsx b/client/modules/IDE/pages/IDEView.jsx
index 5b71444fab..3c323fe88c 100644
--- a/client/modules/IDE/pages/IDEView.jsx
+++ b/client/modules/IDE/pages/IDEView.jsx
@@ -378,12 +378,8 @@ class IDEView extends React.Component {
{this.props.ide.modalIsVisible &&
}
- {this.props.ide.newFolderModalVisible && (
-
- )}
- {this.props.ide.uploadFileModalVisible && (
-
- )}
+ {this.props.ide.newFolderModalVisible &&
}
+ {this.props.ide.uploadFileModalVisible &&
}
{this.props.location.pathname === '/about' && (