File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/components/databrowser/components/display Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 11/* eslint-disable unicorn/no-negated-condition */
22import { useDatabrowserStore } from "@/store"
33
4- import { useKeyType } from "../../hooks/use-keys"
4+ import { useKeys , useKeyType } from "../../hooks/use-keys"
55import { ListDisplay } from "./display-list"
66import { EditorDisplay } from "./display-simple"
77
88export const DataDisplay = ( ) => {
99 const { selectedKey } = useDatabrowserStore ( )
10+ const { query } = useKeys ( )
1011 const type = useKeyType ( selectedKey )
1112
1213 return (
1314 < div className = "h-full rounded-xl border bg-white p-1" >
1415 { ! selectedKey ? (
1516 < div />
1617 ) : ! type ? (
17- < div className = "flex h-full items-center justify-center" >
18- < span className = "text-gray-500" > Loading...</ span >
19- </ div >
18+ query . isLoading ? (
19+ < div className = "flex h-full items-center justify-center" >
20+ < span className = "text-gray-500" > Loading...</ span >
21+ </ div >
22+ ) : (
23+ < div />
24+ )
2025 ) : (
2126 < >
2227 { type === "string" || type === "json" ? (
You can’t perform that action at this time.
0 commit comments