File tree Expand file tree Collapse file tree
webapp/src/routes/_authenticated/studies/$studyId/explore/debug Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,9 +42,11 @@ function Debug() {
4242 // Allow to keep expanded items when the tree is reloaded with `reloadTree`
4343 const [ expandedItems , setExpandedItems ] = useState < string [ ] > ( [ ] ) ;
4444 const { path } = Route . useSearch ( ) ;
45+ const isFilesystemStudy = study . storageMode === "filesystem" ;
4546
4647 const treeDataResponse = usePromiseWithSnackbarError ( ( ) => getTreeData ( study . id ) , {
4748 errorMessage : t ( "studies.error.retrieveData" ) ,
49+ disabled : ! isFilesystemStudy ,
4850 deps : [ study . id ] ,
4951 } ) ;
5052
@@ -108,7 +110,7 @@ function Debug() {
108110 // JSX
109111 ////////////////////////////////////////////////////////////////
110112
111- if ( study . storageMode !== "filesystem" ) {
113+ if ( ! isFilesystemStudy ) {
112114 throw new Error ( `${ Route . path } is only available for studies with filesystem storage mode.` ) ;
113115 }
114116
You can’t perform that action at this time.
0 commit comments