Skip to content

Commit 047c10b

Browse files
committed
Apply codemod
1 parent 73c3c17 commit 047c10b

File tree

46 files changed

+161
-161
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+161
-161
lines changed

site/src/app.tsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,21 @@ const queryClient = new QueryClient({
2424
export const AppProviders: FC<PropsWithChildren> = ({ children }) => {
2525
return (
2626
<HelmetProvider>
27-
<ThemeProvider theme={dark}>
28-
<CssBaseline />
29-
<ErrorBoundary>
30-
<QueryClientProvider client={queryClient}>
31-
<AuthProvider>
32-
{children}
33-
<GlobalSnackbar />
34-
</AuthProvider>
35-
</QueryClientProvider>
36-
</ErrorBoundary>
37-
</ThemeProvider>
27+
<StyledEngineProvider injectFirst>
28+
<ThemeProvider theme={dark}>
29+
<CssBaseline />
30+
<ErrorBoundary>
31+
<QueryClientProvider client={queryClient}>
32+
<AuthProvider>
33+
{children}
34+
<GlobalSnackbar />
35+
</AuthProvider>
36+
</QueryClientProvider>
37+
</ErrorBoundary>
38+
</ThemeProvider>
39+
</StyledEngineProvider>
3840
</HelmetProvider>
39-
)
41+
);
4042
}
4143

4244
export const App: FC = () => {

site/src/components/AlertBanner/AlertBanner.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ const useStyles = makeStyles<Theme, StyleProps>((theme) => ({
104104
textAlign: "left",
105105

106106
"& > span": {
107-
paddingTop: `${theme.spacing(0.25)}px`,
107+
paddingTop: theme.spacing(0.25),
108108
},
109109

110110
// targeting the alert icon rather than the expander icon
111111
"& svg:nth-child(2)": {
112-
marginTop: props.hasDetail ? `${theme.spacing(1)}px` : "inherit",
113-
marginRight: `${theme.spacing(1)}px`,
112+
marginTop: props.hasDetail ? theme.spacing(1) : "inherit",
113+
marginRight: theme.spacing(1),
114114
},
115115
}),
116116

site/src/components/AppLink/AppLinkSkeleton.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { makeStyles } from "@mui/material/styles"
2-
import { Skeleton } from "@material-ui/lab"
2+
import { Skeleton } from '@mui/material';
33
import { FC } from "react"
44
import { borderRadiusSm } from "theme/constants"
55

@@ -9,10 +9,10 @@ export const AppLinkSkeleton: FC<{ width: number }> = ({ width }) => {
99
<Skeleton
1010
width={width}
1111
height={36}
12-
variant="rect"
12+
variant="rectangular"
1313
className={styles.skeleton}
1414
/>
15-
)
15+
);
1616
}
1717

1818
const useStyles = makeStyles(() => ({
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import { FC } from "react"
22
import { Stack } from "components/Stack/Stack"
3-
import { Skeleton } from "@material-ui/lab"
3+
import { Skeleton } from '@mui/material';
44

55
export const AvatarDataSkeleton: FC = () => {
66
return (
77
<Stack spacing={1.5} direction="row" alignItems="center">
8-
<Skeleton variant="circle" width={36} height={36} />
8+
<Skeleton variant="circular" width={36} height={36} />
99

1010
<Stack spacing={0}>
1111
<Skeleton variant="text" width={100} />
1212
<Skeleton variant="text" width={60} />
1313
</Stack>
1414
</Stack>
15-
)
15+
);
1616
}

site/src/components/BorderedMenuRow/BorderedMenuRow.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const iconSize = 20
6666
const useStyles = makeStyles((theme) => ({
6767
root: {
6868
cursor: "pointer",
69-
padding: `0 ${theme.spacing(1)}px`,
69+
padding: `0 ${theme.spacing(1)}`,
7070

7171
"&:hover": {
7272
backgroundColor: "unset",
@@ -86,7 +86,7 @@ const useStyles = makeStyles((theme) => ({
8686
},
8787
},
8888
rootGutters: {
89-
padding: `0 ${theme.spacing(1.5)}px`,
89+
padding: `0 ${theme.spacing(1.5)}`,
9090
},
9191
content: {
9292
borderRadius: theme.shape.borderRadius,

site/src/components/DeploySettingsLayout/Fieldset.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const useStyles = makeStyles((theme) => ({
5858
},
5959
footer: {
6060
background: theme.palette.background.paperLight,
61-
padding: `${theme.spacing(2)}px ${theme.spacing(3)}px`,
61+
padding: `${theme.spacing(2)} ${theme.spacing(3)}`,
6262
display: "flex",
6363
alignItems: "center",
6464
justifyContent: "space-between",

site/src/components/DeploymentBanner/DeploymentBannerView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ const useStyles = makeStyles((theme) => ({
251251
height: 16,
252252
},
253253

254-
[theme.breakpoints.down("md")]: {
254+
[theme.breakpoints.down('lg')]: {
255255
display: "none",
256256
},
257257
},
@@ -269,7 +269,7 @@ const useStyles = makeStyles((theme) => ({
269269
gap: theme.spacing(4),
270270
borderTop: `1px solid ${theme.palette.divider}`,
271271

272-
[theme.breakpoints.down("md")]: {
272+
[theme.breakpoints.down('lg')]: {
273273
flexDirection: "column",
274274
gap: theme.spacing(1),
275275
alignItems: "left",

site/src/components/Dialogs/ConfirmDialog/ConfirmDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const useStyles = makeStyles((theme) => ({
6464
maxWidth: theme.spacing(55),
6565
},
6666
"& .MuiDialogActions-spacing": {
67-
padding: `0 ${theme.spacing(5)}px ${theme.spacing(5)}px`,
67+
padding: `0 ${theme.spacing(5)} ${theme.spacing(5)}`,
6868
},
6969
},
7070
dialogContent: {

site/src/components/EnterpriseSnackbar/EnterpriseSnackbar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const EnterpriseSnackbar: FC<
4242
action={
4343
<div className={styles.actionWrapper}>
4444
{action}
45-
<IconButton onClick={onClose} className={styles.iconButton}>
45+
<IconButton onClick={onClose} className={styles.iconButton} size="large">
4646
<CloseIcon className={styles.closeIcon} aria-label="close" />
4747
</IconButton>
4848
</div>
@@ -58,7 +58,7 @@ export const EnterpriseSnackbar: FC<
5858
}}
5959
onClose={onClose}
6060
/>
61-
)
61+
);
6262
}
6363

6464
const useStyles = makeStyles((theme) => ({

site/src/components/Expander/Expander.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const useStyles = makeStyles((theme) => ({
5858
color: theme.palette.text.secondary,
5959
},
6060
collapseLink: {
61-
marginTop: `${theme.spacing(2)}px`,
61+
marginTop: theme.spacing(2),
6262
},
6363
text: {
6464
display: "flex",

site/src/components/Form/Form.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ const useStyles = makeStyles((theme) => ({
122122
gap: ({ direction }: FormContextValue = {}) =>
123123
direction === "horizontal" ? theme.spacing(10) : theme.spacing(5),
124124

125-
[theme.breakpoints.down("sm")]: {
125+
[theme.breakpoints.down('md')]: {
126126
gap: theme.spacing(8),
127127
},
128128
},
@@ -135,7 +135,7 @@ const useStyles = makeStyles((theme) => ({
135135
flexDirection: ({ direction }: FormContextValue = {}) =>
136136
direction === "horizontal" ? "row" : "column",
137137

138-
[theme.breakpoints.down("sm")]: {
138+
[theme.breakpoints.down('md')]: {
139139
flexDirection: "column",
140140
gap: theme.spacing(2),
141141
},
@@ -150,7 +150,7 @@ const useStyles = makeStyles((theme) => ({
150150
direction === "horizontal" ? "sticky" : undefined,
151151
top: theme.spacing(3),
152152

153-
[theme.breakpoints.down("sm")]: {
153+
[theme.breakpoints.down('md')]: {
154154
width: "100%",
155155
position: "initial",
156156
},
@@ -180,7 +180,7 @@ const useFormFooterStyles = makeStyles((theme) => ({
180180
button: {
181181
minWidth: theme.spacing(23),
182182

183-
[theme.breakpoints.down("sm")]: {
183+
[theme.breakpoints.down('md')]: {
184184
width: "100%",
185185
},
186186
},
@@ -191,7 +191,7 @@ const useFormFooterStyles = makeStyles((theme) => ({
191191
flexDirection: "row-reverse",
192192
gap: theme.spacing(2),
193193

194-
[theme.breakpoints.down("sm")]: {
194+
[theme.breakpoints.down('md')]: {
195195
flexDirection: "column",
196196
gap: theme.spacing(1),
197197
},

site/src/components/FormCloseButton/FormCloseButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const useStyles = makeStyles((theme) => ({
4848
opacity: 1,
4949
},
5050

51-
[theme.breakpoints.down("sm")]: {
51+
[theme.breakpoints.down('md')]: {
5252
top: theme.spacing(1),
5353
right: theme.spacing(1),
5454
},

site/src/components/IconField/IconField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const IconField: FC<IconFieldProps> = ({ onPickEmoji, ...textFieldProps }) => {
8484
/>
8585
</Popover>
8686
</div>
87-
)
87+
);
8888
}
8989

9090
const useStyles = makeStyles((theme) => ({

site/src/components/Logs/Logs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const LogLine: FC<{
6666
lineNumbers: Boolean(number),
6767
})
6868
const output = useMemo(() => {
69-
return convert.toHtml(line.output.split(/\r/g).pop() as string)
69+
return convert.toHtml(line.output.split(/\r/g).pop() as string);
7070
}, [line.output])
7171

7272
return (

site/src/components/Markdown/Markdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export const Markdown: FC<{ children: string }> = ({ children }) => {
9595
>
9696
{children}
9797
</ReactMarkdown>
98-
)
98+
);
9999
}
100100

101101
export const MemoizedMarkdown = memo(Markdown)

site/src/components/NavbarView/NavbarView.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export const NavbarView: React.FC<React.PropsWithChildren<NavbarViewProps>> = ({
104104
onClick={() => {
105105
setIsDrawerOpen(true)
106106
}}
107-
>
107+
size="large">
108108
<MenuIcon />
109109
</IconButton>
110110

@@ -156,7 +156,7 @@ export const NavbarView: React.FC<React.PropsWithChildren<NavbarViewProps>> = ({
156156
</div>
157157
</div>
158158
</nav>
159-
)
159+
);
160160
}
161161

162162
const useStyles = makeStyles((theme) => ({
@@ -231,7 +231,7 @@ const useStyles = makeStyles((theme) => ({
231231
display: "flex",
232232
flex: 1,
233233
fontSize: 16,
234-
padding: `${theme.spacing(1.5)}px ${theme.spacing(2)}px`,
234+
padding: `${theme.spacing(1.5)} ${theme.spacing(2)}`,
235235
textDecoration: "none",
236236
transition: "background-color 0.15s ease-in-out",
237237

@@ -247,7 +247,7 @@ const useStyles = makeStyles((theme) => ({
247247

248248
[theme.breakpoints.up("md")]: {
249249
height: navHeight,
250-
padding: `0 ${theme.spacing(3)}px`,
250+
padding: `0 ${theme.spacing(3)}`,
251251
},
252252
},
253253
}))

site/src/components/PageHeader/FullWidthPageHeader.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ const useStyles = makeStyles((theme) => ({
3939
zIndex: 10,
4040
flexWrap: "wrap",
4141

42-
[theme.breakpoints.down("md")]: {
42+
[theme.breakpoints.down('lg')]: {
4343
position: "unset",
4444
alignItems: "flex-start",
4545
},
46-
[theme.breakpoints.down("sm")]: {
46+
[theme.breakpoints.down('md')]: {
4747
flexDirection: "column",
4848
},
4949
},
5050
actions: {
5151
marginLeft: "auto",
52-
[theme.breakpoints.down("sm")]: {
52+
[theme.breakpoints.down('md')]: {
5353
marginLeft: "unset",
5454
},
5555
},

site/src/components/PageHeader/PageHeader.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const useStyles = makeStyles((theme) => ({
6161
paddingBottom: theme.spacing(6),
6262
gap: theme.spacing(4),
6363

64-
[theme.breakpoints.down("sm")]: {
64+
[theme.breakpoints.down('md')]: {
6565
flexDirection: "column",
6666
alignItems: "flex-start",
6767
},
@@ -90,7 +90,7 @@ const useStyles = makeStyles((theme) => ({
9090
actions: {
9191
marginLeft: "auto",
9292

93-
[theme.breakpoints.down("sm")]: {
93+
[theme.breakpoints.down('md')]: {
9494
marginTop: theme.spacing(3),
9595
marginLeft: "initial",
9696
width: "100%",

site/src/components/PaginationWidget/PaginationWidget.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const PaginationWidget = ({
2727
paginationRef,
2828
}: PaginationWidgetProps): JSX.Element | null => {
2929
const theme = useTheme()
30-
const isMobile = useMediaQuery(theme.breakpoints.down("sm"))
30+
const isMobile = useMediaQuery(theme.breakpoints.down('md'))
3131
const styles = useStyles()
3232
const [paginationState, send] = useActor(paginationRef)
3333

@@ -106,6 +106,6 @@ const useStyles = makeStyles((theme) => ({
106106
},
107107

108108
prevLabelStyles: {
109-
marginRight: `${theme.spacing(0.5)}px`,
109+
marginRight: theme.spacing(0.5),
110110
},
111111
}))

site/src/components/PaginationWidget/PaginationWidgetBase.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const PaginationWidgetBase = ({
2121
onChange,
2222
}: PaginationWidgetBaseProps): JSX.Element | null => {
2323
const theme = useTheme()
24-
const isMobile = useMediaQuery(theme.breakpoints.down("sm"))
24+
const isMobile = useMediaQuery(theme.breakpoints.down('md'))
2525
const styles = useStyles()
2626
const numPages = Math.ceil(count / limit)
2727
const isFirstPage = page === 0
@@ -99,6 +99,6 @@ const useStyles = makeStyles((theme) => ({
9999
},
100100

101101
prevLabelStyles: {
102-
marginRight: `${theme.spacing(0.5)}px`,
102+
marginRight: theme.spacing(0.5),
103103
},
104104
}))

site/src/components/PortForwardButton/PortForwardButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ export const PortForwardButton: React.FC<PortForwardButtonProps> = (props) => {
181181

182182
const useStyles = makeStyles((theme) => ({
183183
popoverPaper: {
184-
padding: `${theme.spacing(2.5)}px ${theme.spacing(3.5)}px ${theme.spacing(
184+
padding: `${theme.spacing(2.5)} ${theme.spacing(3.5)} ${theme.spacing(
185185
3.5,
186-
)}px`,
186+
)}`,
187187
width: theme.spacing(52),
188188
color: theme.palette.text.secondary,
189189
marginTop: theme.spacing(0.25),

site/src/components/Resources/AgentMetadata.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { WorkspaceAgent, WorkspaceAgentMetadata } from "api/typesGenerated"
44
import { Stack } from "components/Stack/Stack"
55
import dayjs from "dayjs"
66
import { createContext, FC, useContext, useEffect, useState } from "react"
7-
import { Skeleton } from "@material-ui/lab"
7+
import { Skeleton } from '@mui/material';
88
import { MONOSPACE_FONT_FAMILY } from "theme/constants"
99

1010
type ItemStatus = "stale" | "valid" | "loading"

0 commit comments

Comments
 (0)