Skip to content

Commit 1d71484

Browse files
committed
build issue fixed
1 parent 059f71f commit 1d71484

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

thingconnect.pulse.client/src/components/AvailabilityChart.tsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,25 @@ export function AvailabilityChart({
2424
height = 300,
2525
isLoading,
2626
}: AvailabilityChartProps) {
27+
if (isLoading) {
28+
return (
29+
<Box
30+
height='100%'
31+
display='flex'
32+
alignItems='center'
33+
justifyContent='center'
34+
borderRadius='md'
35+
borderWidth='1px'
36+
bg='gray.50'
37+
_dark={{ bg: 'gray.800' }}
38+
>
39+
<VStack w='full' px={6} gap={4}>
40+
<Skeleton height='100%' width='100%' />
41+
</VStack>
42+
</Box>
43+
);
44+
}
45+
2746
const chartData = useMemo(() => {
2847
if (!data) return null;
2948
switch (bucket) {
@@ -105,7 +124,6 @@ export function AvailabilityChart({
105124
const chartHeight = Math.max(dimensions.height - margin.top - margin.bottom, 0);
106125

107126
return (
108-
// <Skeleton loading={isLoading} w='full' h='full' position='relative'>
109127
<Box ref={containerRef} flex={1} minH={0} w='full' h='full' position='relative'>
110128
<svg
111129
width='100%'
@@ -175,6 +193,5 @@ export function AvailabilityChart({
175193
</g>
176194
</svg>
177195
</Box>
178-
// </Skeleton>
179196
);
180197
}

thingconnect.pulse.client/src/pages/History.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ export default function History() {
262262
{/* History Data */}
263263
{selectedEndpoint ? (
264264
<>
265-
<PageSection title='Performance Summary' collapsible={true} testId='availability-stats'>
265+
<PageSection title='Performance Summary' testId='availability-stats'>
266266
<AvailabilityStats
267267
data={historyData}
268268
bucket={bucket}

0 commit comments

Comments
 (0)