Skip to content

Commit 0587497

Browse files
committed
emotion: GroupsPageView
1 parent 13db92d commit 0587497

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

site/src/pages/GroupsPage/GroupsPageView.tsx

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { type Interpolation, type Theme } from "@emotion/react";
12
import Button from "@mui/material/Button";
23
import Link from "@mui/material/Link";
3-
import { makeStyles } from "@mui/styles";
44
import Table from "@mui/material/Table";
55
import TableBody from "@mui/material/TableBody";
66
import TableCell from "@mui/material/TableCell";
@@ -20,10 +20,10 @@ import {
2020
TableRowSkeleton,
2121
} from "components/TableLoader/TableLoader";
2222
import { UserAvatar } from "components/UserAvatar/UserAvatar";
23-
import { FC } from "react";
23+
import { type FC } from "react";
2424
import { Link as RouterLink, useNavigate } from "react-router-dom";
2525
import { Paywall } from "components/Paywall/Paywall";
26-
import { Group } from "api/typesGenerated";
26+
import type { Group } from "api/typesGenerated";
2727
import { GroupAvatar } from "components/GroupAvatar/GroupAvatar";
2828
import { docs } from "utils/docs";
2929
import Skeleton from "@mui/material/Skeleton";
@@ -44,7 +44,6 @@ export const GroupsPageView: FC<GroupsPageViewProps> = ({
4444
const isLoading = Boolean(groups === undefined);
4545
const isEmpty = Boolean(groups && groups.length === 0);
4646
const navigate = useNavigate();
47-
const styles = useStyles();
4847

4948
return (
5049
<>
@@ -137,7 +136,7 @@ export const GroupsPageView: FC<GroupsPageViewProps> = ({
137136
navigate(groupPageLink);
138137
}
139138
}}
140-
className={styles.clickableTableRow}
139+
css={styles.clickableTableRow}
141140
>
142141
<TableCell>
143142
<AvatarData
@@ -170,10 +169,8 @@ export const GroupsPageView: FC<GroupsPageViewProps> = ({
170169
</TableCell>
171170

172171
<TableCell>
173-
<div className={styles.arrowCell}>
174-
<KeyboardArrowRight
175-
className={styles.arrowRight}
176-
/>
172+
<div css={styles.arrowCell}>
173+
<KeyboardArrowRight css={styles.arrowRight} />
177174
</div>
178175
</TableCell>
179176
</TableRow>
@@ -210,8 +207,8 @@ const TableLoader = () => {
210207
);
211208
};
212209

213-
const useStyles = makeStyles((theme) => ({
214-
clickableTableRow: {
210+
const styles = {
211+
clickableTableRow: (theme) => ({
215212
cursor: "pointer",
216213

217214
"&:hover td": {
@@ -225,15 +222,15 @@ const useStyles = makeStyles((theme) => ({
225222
"& .MuiTableCell-root:last-child": {
226223
paddingRight: theme.spacing(2),
227224
},
228-
},
229-
arrowRight: {
225+
}),
226+
arrowRight: (theme) => ({
230227
color: theme.palette.text.secondary,
231228
width: 20,
232229
height: 20,
233-
},
230+
}),
234231
arrowCell: {
235232
display: "flex",
236233
},
237-
}));
234+
} satisfies Record<string, Interpolation<Theme>>;
238235

239236
export default GroupsPageView;

0 commit comments

Comments
 (0)