Skip to content

Commit cde4189

Browse files
committed
emotion: GroupPage
1 parent b8af7e9 commit cde4189

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

site/src/pages/GroupsPage/GroupPage.tsx

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import TableRow from "@mui/material/TableRow";
88
import DeleteOutline from "@mui/icons-material/DeleteOutline";
99
import PersonAdd from "@mui/icons-material/PersonAdd";
1010
import SettingsOutlined from "@mui/icons-material/SettingsOutlined";
11-
import { Group, User } from "api/typesGenerated";
11+
import type { Group, User } from "api/typesGenerated";
1212
import { AvatarData } from "components/AvatarData/AvatarData";
1313
import { DeleteDialog } from "components/Dialogs/DeleteDialog/DeleteDialog";
1414
import { EmptyState } from "components/EmptyState/EmptyState";
@@ -26,7 +26,6 @@ import { type FC, useState } from "react";
2626
import { Helmet } from "react-helmet-async";
2727
import { Link as RouterLink, useNavigate, useParams } from "react-router-dom";
2828
import { pageTitle } from "utils/page";
29-
import { makeStyles } from "@mui/styles";
3029
import {
3130
PaginationStatus,
3231
TableToolbar,
@@ -60,7 +59,6 @@ export const GroupPage: FC = () => {
6059
const [isDeletingGroup, setIsDeletingGroup] = useState(false);
6160
const isLoading = !groupData || !permissions;
6261
const canUpdateGroup = permissions ? permissions.canUpdateGroup : false;
63-
const styles = useStyles();
6462

6563
const helmet = (
6664
<Helmet>
@@ -103,7 +101,7 @@ export const GroupPage: FC = () => {
103101
setIsDeletingGroup(true);
104102
}}
105103
startIcon={<DeleteOutline />}
106-
className={styles.removeButton}
104+
css={styles.removeButton}
107105
>
108106
Delete&hellip;
109107
</Button>
@@ -213,7 +211,6 @@ const AddGroupMember: React.FC<{
213211
onSubmit: (user: User, reset: () => void) => void;
214212
}> = ({ isLoading, onSubmit }) => {
215213
const [selectedUser, setSelectedUser] = useState<User | null>(null);
216-
const styles = useStyles();
217214

218215
const resetValues = () => {
219216
setSelectedUser(null);
@@ -231,7 +228,7 @@ const AddGroupMember: React.FC<{
231228
>
232229
<Stack direction="row" alignItems="center" spacing={1}>
233230
<UserAutocomplete
234-
className={styles.autoComplete}
231+
css={styles.autoComplete}
235232
value={selectedUser}
236233
onChange={(newValue) => {
237234
setSelectedUser(newValue);
@@ -312,19 +309,16 @@ const GroupMemberRow = (props: {
312309
);
313310
};
314311

315-
const useStyles = makeStyles((theme) => ({
312+
const styles = {
316313
autoComplete: {
317314
width: 300,
318315
},
319-
removeButton: {
316+
removeButton: (theme) => ({
320317
color: theme.palette.error.main,
321318
"&:hover": {
322319
backgroundColor: "transparent",
323320
},
324-
},
325-
}));
326-
327-
const styles = {
321+
}),
328322
status: {
329323
textTransform: "capitalize",
330324
},

0 commit comments

Comments
 (0)