import { useTranslation } from 'react-i18next' import FileTreeCreateNewDoc from './modes/file-tree-create-new-doc' import FileTreeImportFromUrl from './modes/file-tree-import-from-url' import FileTreeImportFromProject from './modes/file-tree-import-from-project' import FileTreeUploadDoc from './modes/file-tree-upload-doc' import FileTreeModalCreateFileMode from './file-tree-modal-create-file-mode' import FileTreeCreateNameProvider from '../../contexts/file-tree-create-name' import { useFileTreeActionable } from '../../contexts/file-tree-actionable' import { useFileTreeMutable } from '../../contexts/file-tree-mutable' import importOverleafModules from '../../../../../macros/import-overleaf-module.macro' const createFileModeModules = importOverleafModules('createFileModes') export default function FileTreeModalCreateFileBody() { const { t } = useTranslation() const { newFileCreateMode } = useFileTreeActionable() const { fileCount } = useFileTreeMutable() if (!fileCount || fileCount.status === 'error') { return null } return (
|
{newFileCreateMode === 'doc' && (
|