@@ -7,9 +7,7 @@ import { Page } from '@/components/layout/Page';
77import { PageSection } from '@/components/layout/PageSection' ;
88import type { LiveStatusParams } from '@/api/types' ;
99import { Activity , AlertTriangle , CheckCircle , XCircle } from 'lucide-react' ;
10-
1110import type { LiveStatusItem } from '@/api/types' ;
12- import { text } from 'stream/consumers' ;
1311
1412type GroupedEndpoints =
1513 | LiveStatusItem [ ]
@@ -38,7 +36,7 @@ export default function Dashboard() {
3836
3937 const [ searchTerm , setSearchTerm ] = useState ( '' ) ;
4038
41- const { data, isLoading } = useStatusQuery ( {
39+ const { data, isLoading, isFetching } = useStatusQuery ( {
4240 ...filters ,
4341 search : searchTerm ,
4442 } ) ;
@@ -185,36 +183,6 @@ export default function Dashboard() {
185183 ) ;
186184 } ;
187185
188- const StatCard = ( {
189- icon : Icon ,
190- title,
191- value,
192- color,
193- } : {
194- icon : React . ComponentType < { size : number ; color : string } > ;
195- title : string ;
196- value : number ;
197- color : string ;
198- } ) => (
199- < Card . Root >
200- < Card . Body >
201- < Flex align = 'center' justify = 'space-between' >
202- < VStack align = 'start' gap = '1' >
203- < Text fontSize = 'sm' color = 'fg.muted' fontWeight = 'medium' >
204- { title }
205- </ Text >
206- < Text fontSize = '3xl' fontWeight = 'bold' color = { `${ color } .500` } >
207- { value }
208- </ Text >
209- </ VStack >
210- < Box p = '3' rounded = 'xl' bg = { `${ color } .100` } >
211- < Icon size = { 24 } color = { color } />
212- </ Box >
213- </ Flex >
214- </ Card . Body >
215- </ Card . Root >
216- ) ;
217-
218186 return (
219187 < Page
220188 title = 'Dashboard'
@@ -274,12 +242,9 @@ export default function Dashboard() {
274242 key = { stat . title }
275243 p = '6'
276244 borderRadius = 'xl'
277- boxShadow = 'sm'
278- _hover = { {
279- boxShadow : 'md' ,
280- transform : 'translateY(-2px)' ,
281- transition : 'all 0.2s' ,
282- } }
245+ borderWidth = { 1 }
246+ borderColor = { 'gray.200' }
247+ _dark = { { borderColor :'gray.200' } }
283248 >
284249 < VStack align = 'flex-start' gap = '4' >
285250 < HStack justifyContent = { 'space-between' } w = { 'full' } >
@@ -402,7 +367,7 @@ export default function Dashboard() {
402367 < Accordion . Root multiple variant = 'plain' pl = { 4 } >
403368 { Object . entries ( typedGroupItems ) . map ( ( [ group , items ] ) => (
404369 < Accordion . Item key = { group } value = { group } >
405- < Accordion . ItemTrigger >
370+ < Accordion . ItemTrigger >
406371 < HStack w = 'full' justify = 'space-between' >
407372 < HStack px = { '10px' } >
408373 < Accordion . ItemIndicator
@@ -458,7 +423,7 @@ export default function Dashboard() {
458423
459424 return (
460425 < Accordion . Item key = { group } value = { group } my = { 2 } >
461- < Accordion . ItemTrigger borderWidth = { 1 } >
426+ < Accordion . ItemTrigger borderWidth = { 1 } _dark = { { borderColor : 'gray.200' } } >
462427 < HStack w = 'full' justify = 'space-between' >
463428 < HStack px = { '10px' } >
464429 < Accordion . ItemIndicator fontSize = { 'md' } fontWeight = { 'bolder' } />
@@ -570,7 +535,7 @@ export default function Dashboard() {
570535 } ) }
571536 </ Accordion . Root >
572537 ) : (
573- < StatusTable items = { Object . values ( groupedEndpoints ) . flat ( ) } isLoading = { isLoading } />
538+ < StatusTable items = { Object . values ( groupedEndpoints ) . flat ( ) } isLoading = { isLoading || isFetching } />
574539 )
575540 ) : (
576541 < StatusTable items = { data . items } isLoading = { isLoading } />
0 commit comments