diff --git a/webapp/src/components/App/Singlestudy/explore/Debug/Data/index.tsx b/webapp/src/components/App/Singlestudy/explore/Debug/Data/index.tsx index 6a46036da6..039fac45b1 100644 --- a/webapp/src/components/App/Singlestudy/explore/Debug/Data/index.tsx +++ b/webapp/src/components/App/Singlestudy/explore/Debug/Data/index.tsx @@ -6,9 +6,10 @@ import Folder from "./Folder"; import type { FileInfo, FileType } from "../utils"; import type { DataCompProps } from "../utils"; import ViewWrapper from "../../../../../common/page/ViewWrapper"; +import type { StudyMetadata } from "../../../../../../common/types"; interface Props extends FileInfo { - studyId: string; + study: StudyMetadata; setSelectedFile: (file: FileInfo) => void; reloadTreeData: () => void; } @@ -24,11 +25,12 @@ const componentByFileType: Record = { } as const; function Data(props: Props) { - const { studyId, setSelectedFile, reloadTreeData, ...fileInfo } = props; + const { study, setSelectedFile, reloadTreeData, ...fileInfo } = props; const { fileType, filePath } = fileInfo; const DataViewer = componentByFileType[fileType]; const enableImport = + !study.archived && (filePath === "user" || filePath.startsWith("user/")) && // To remove when Xpansion tool configuration will be moved to "input/expansion" directory !(filePath === "user/expansion" || filePath.startsWith("user/expansion/")); @@ -37,7 +39,7 @@ function Data(props: Props) { )}