File tree Expand file tree Collapse file tree 1 file changed +31
-1
lines changed
Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { useStats } from '../queries/useStats.ts';
66import { useDetailedStats } from '../queries/useDetailedStats.ts' ;
77import { MetricPlot } from '../components/metrics/metric-plot.tsx' ;
88import { MetricModal } from '../components/modals/metric-modal.tsx' ;
9+ import { CardSkeleton } from '../components/skeletons/card-skeleton' ;
910
1011
1112interface MetricModalProps {
@@ -40,10 +41,39 @@ export const Metrics = () => {
4041 } ;
4142
4243 const { data : bedbaseStats } = useStats ( ) ;
43- const { data : detailedStats } = useDetailedStats ( ) ;
44+ const { data : detailedStats , isLoading } = useDetailedStats ( ) ;
4445
4546 const sliceIndex = 5 ;
4647
48+ if ( isLoading ) {
49+ return (
50+ < Layout title = 'BEDbase' footer >
51+ < div className = "my-2" >
52+ < Row >
53+ < Col sm = { 12 } md = { 12 } >
54+ < div className = "mb-2" >
55+ < CardSkeleton height = "200px" />
56+ </ div >
57+ </ Col >
58+ </ Row >
59+ < Row >
60+ < Col sm = { 5 } md = { 5 } >
61+ < div className = "mb-2" >
62+ < CardSkeleton height = "300px" />
63+ </ div >
64+ < div className = "mb-2" >
65+ < CardSkeleton height = "300px" />
66+ </ div >
67+ </ Col >
68+ < Col sm = { 7 } md = { 7 } >
69+ < CardSkeleton height = "100%" />
70+ </ Col >
71+ </ Row >
72+ </ div >
73+ </ Layout >
74+ ) ;
75+ } ;
76+
4777 return (
4878 < Layout footer title = 'BEDbase' fullHeight >
4979 < Container fluid >
You can’t perform that action at this time.
0 commit comments