|
|
@@ -4,16 +4,10 @@ import { withTranslation } from 'react-i18next';
|
|
|
import {
|
|
|
Modal, ModalHeader, ModalBody, ModalFooter,
|
|
|
} from 'reactstrap';
|
|
|
-import { pathUtils } from 'growi-commons';
|
|
|
-import { withUnstatedContainers } from './UnstatedUtils';
|
|
|
-import AppContainer from '../services/AppContainer';
|
|
|
-import PageContainer from '../services/PageContainer';
|
|
|
|
|
|
|
|
|
const ArchiveCreateModal = (props) => {
|
|
|
- const { t, pageContainer } = props;
|
|
|
- const { path } = pageContainer.state;
|
|
|
- const parentPath = pathUtils.addTrailingSlash(path);
|
|
|
+ const { t } = props;
|
|
|
const [isCommentDownload, setIsCommentDownload] = useState(false);
|
|
|
const [isFileDownload, setIsFileDownload] = useState(false);
|
|
|
const [isSubordinatedPageDownload, setIsSubordinatedPageDownload] = useState(false);
|
|
|
@@ -58,7 +52,7 @@ const ArchiveCreateModal = (props) => {
|
|
|
<div className="form-group">
|
|
|
<label>{t('Target page')}</label>
|
|
|
<br />
|
|
|
- <code>{parentPath}</code>
|
|
|
+ <code>{props.path}</code>
|
|
|
</div>
|
|
|
|
|
|
<div className="custom-control-inline">
|
|
|
@@ -146,17 +140,13 @@ const ArchiveCreateModal = (props) => {
|
|
|
);
|
|
|
};
|
|
|
|
|
|
-const ArchiveCreateModalWrapper = withUnstatedContainers(ArchiveCreateModal, [AppContainer, PageContainer]);
|
|
|
-
|
|
|
|
|
|
ArchiveCreateModal.propTypes = {
|
|
|
t: PropTypes.func.isRequired, // i18next
|
|
|
- AppContainer: PropTypes.instanceOf(AppContainer).isRequired,
|
|
|
- pageContainer: PropTypes.instanceOf(PageContainer).isRequired,
|
|
|
isOpen: PropTypes.bool.isRequired,
|
|
|
onClose: PropTypes.func,
|
|
|
path: PropTypes.string.isRequired,
|
|
|
};
|
|
|
|
|
|
|
|
|
-export default withTranslation()(ArchiveCreateModalWrapper);
|
|
|
+export default withTranslation()(ArchiveCreateModal);
|