File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -42,12 +42,16 @@ const AnatomyEditor = ({
42
42
43
43
const { data : schema } = useGetAnatomySchemaQuery ( )
44
44
45
- const { data : anatomyPresetData } = useGetAnatomyPresetQuery ( { preset } , { skip : ! preset } )
46
- const { data : projectAnatomyData } = useGetProjectAnatomyQuery (
45
+ const { data : anatomyPresetData , isLoading : presetLoading } = useGetAnatomyPresetQuery (
46
+ { preset } ,
47
+ { skip : ! preset } ,
48
+ )
49
+ const { data : projectAnatomyData , isLoading : prjLoading } = useGetProjectAnatomyQuery (
47
50
{ projectName } ,
48
51
{ skip : ! projectName } ,
49
52
)
50
53
const dispatch = useDispatch ( )
54
+ const isLoading = presetLoading || prjLoading
51
55
52
56
useEffect ( ( ) => {
53
57
if ( ! anatomyPresetData ) return
@@ -89,6 +93,10 @@ const AnatomyEditor = ({
89
93
}
90
94
}
91
95
96
+ if ( isLoading ) {
97
+ return 'Loading...'
98
+ }
99
+
92
100
if ( ! ( preset || projectName ) ) return 'No preset or project selected'
93
101
if ( preset && projectName ) return 'Select either preset or project'
94
102
if ( ! ( schema && originalData ) ) return null
You can’t perform that action at this time.
0 commit comments