1
+ import { type Interpolation , type Theme } from "@emotion/react" ;
1
2
import Box from "@mui/material/Box" ;
2
3
import { useQuery } from "react-query" ;
3
4
import { getHealth } from "api/api" ;
@@ -16,7 +17,6 @@ import {
16
17
PageHeaderSubtitle ,
17
18
} from "components/PageHeader/FullWidthPageHeader" ;
18
19
import { Stats , StatsItem } from "components/Stats/Stats" ;
19
- import { makeStyles } from "@mui/styles" ;
20
20
import { createDayString } from "utils/createDayString" ;
21
21
import { DashboardFullPage } from "components/Dashboard/DashboardLayout" ;
22
22
@@ -57,8 +57,6 @@ export function HealthPageView({
57
57
healthStatus : Awaited < ReturnType < typeof getHealth > > ;
58
58
tab : ReturnType < typeof useTab > ;
59
59
} ) {
60
- const styles = useStyles ( ) ;
61
-
62
60
return (
63
61
< DashboardFullPage >
64
62
< FullWidthPageHeader sticky = { false } >
@@ -93,14 +91,14 @@ export function HealthPageView({
93
91
</ div >
94
92
</ Stack >
95
93
96
- < Stats aria-label = "Deployment details" className = { styles . stats } >
94
+ < Stats aria-label = "Deployment details" css = { styles . stats } >
97
95
< StatsItem
98
- className = { styles . statsItem }
96
+ css = { styles . statsItem }
99
97
label = "Last check"
100
98
value = { createDayString ( healthStatus . time ) }
101
99
/>
102
100
< StatsItem
103
- className = { styles . statsItem }
101
+ css = { styles . statsItem }
104
102
label = "Coder version"
105
103
value = { healthStatus . coder_version }
106
104
/>
@@ -212,8 +210,8 @@ export function HealthPageView({
212
210
) ;
213
211
}
214
212
215
- const useStyles = makeStyles ( ( theme ) => ( {
216
- stats : {
213
+ const styles = {
214
+ stats : ( theme ) => ( {
217
215
padding : 0 ,
218
216
border : 0 ,
219
217
gap : theme . spacing ( 6 ) ,
@@ -226,7 +224,7 @@ const useStyles = makeStyles((theme) => ({
226
224
alignItems : "flex-start" ,
227
225
gap : theme . spacing ( 1 ) ,
228
226
} ,
229
- } ,
227
+ } ) ,
230
228
231
229
statsItem : {
232
230
flexDirection : "column" ,
@@ -238,4 +236,4 @@ const useStyles = makeStyles((theme) => ({
238
236
fontWeight : 500 ,
239
237
} ,
240
238
} ,
241
- } ) ) ;
239
+ } satisfies Record < string , Interpolation < Theme > > ;
0 commit comments