Skip to content

Commit 421ab68

Browse files
committed
yes
1 parent 2a087e5 commit 421ab68

File tree

6 files changed

+25
-22
lines changed

6 files changed

+25
-22
lines changed

site/.eslintrc.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ rules:
142142
- name: "@mui/material/Typography"
143143
message:
144144
"You should use the native HTML elements as span, p, h1, h2, h3..."
145+
- name: "@mui/material/Box"
146+
message: "You should use a <div> instead"
147+
- name: "@mui/styles"
148+
message: "You should use @emotion/react and the css prop instead"
145149
no-unused-vars: "off"
146150
"object-curly-spacing": "off"
147151
react-hooks/exhaustive-deps: warn

site/src/@types/emotion.d.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import type { DefaultTheme as MuiTheme } from "@mui/system";
1+
import type { Theme as MuiTheme } from "@mui/material/styles";
22
import type { NewTheme } from "theme/experimental";
33

44
declare module "@emotion/react" {
5-
interface Theme extends MuiTheme {
6-
experimental: NewTheme;
7-
}
5+
interface Theme extends MuiTheme {}
86
}

site/src/components/ActiveUserChart/ActiveUserChart.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { Theme } from "@mui/material/styles";
2-
import useTheme from "@mui/styles/useTheme";
31
import {
42
CategoryScale,
53
Chart as ChartJS,
@@ -21,6 +19,7 @@ import {
2119
HelpTooltipText,
2220
} from "components/HelpTooltip/HelpTooltip";
2321
import dayjs from "dayjs";
22+
import { useTheme } from "@emotion/react";
2423
import { type FC } from "react";
2524
import { Line } from "react-chartjs-2";
2625
import annotationPlugin from "chartjs-plugin-annotation";
@@ -51,7 +50,7 @@ export const ActiveUserChart: FC<ActiveUserChartProps> = ({
5150
interval,
5251
userLimit,
5352
}) => {
54-
const theme: Theme = useTheme();
53+
const theme = useTheme();
5554

5655
const labels = data.map((val) => dayjs(val.date).format("YYYY-MM-DD"));
5756
const chartData = data.map((val) => val.amount);

site/src/pages/TemplateSettingsPage/TemplateSchedulePage/ScheduleDialog.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,15 @@ export const ScheduleDialog: FC<PropsWithChildren<ScheduleDialogProps>> = ({
8888

8989
{showDeletionWarning && (
9090
<>
91-
<h4>{"Dormancy Auto-Deletion"}</h4>
91+
<h4>Dormancy Auto-Deletion</h4>
9292
<Stack direction="row" spacing={5}>
93-
<div
94-
css={styles.dialogDescription}
95-
>{`This change will result in ${dormantWorkspacesToBeDeleted} workspaces being immediately deleted and ${dormantWorkspacesToBeDeletedInWeek} over the next 7 days. To prevent this, do you want to reset the dormancy period for all template workspaces?`}</div>
93+
<div css={styles.dialogDescription}>
94+
This change will result in {dormantWorkspacesToBeDeleted}{" "}
95+
workspaces being immediately deleted and{" "}
96+
{dormantWorkspacesToBeDeletedInWeek} over the next 7 days. To
97+
prevent this, do you want to reset the dormancy period for all
98+
template workspaces?
99+
</div>
96100
<FormControlLabel
97101
css={{ marginTop: 2 }}
98102
control={

site/src/pages/UserSettingsPage/AccountPage/AccountPage.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1+
import { Stack } from "@mui/system";
12
import { type FC } from "react";
3+
import { useQuery } from "react-query";
24
import { useMe } from "hooks/useMe";
5+
import { useOrganizationId } from "hooks";
36
import { usePermissions } from "hooks/usePermissions";
4-
import { useQuery } from "react-query";
57
import { groupsForUser } from "api/queries/groups";
6-
import { useOrganizationId } from "hooks";
78
import { useAuth } from "components/AuthProvider/AuthProvider";
8-
9-
import { Stack } from "@mui/system";
9+
import { Section } from "components/SettingsLayout/Section";
1010
import { AccountUserGroups } from "./AccountUserGroups";
1111
import { AccountForm } from "./AccountForm";
12-
import { Section } from "components/SettingsLayout/Section";
1312

1413
export const AccountPage: FC = () => {
1514
const { updateProfile, updateProfileError, isUpdatingProfile } = useAuth();

site/src/pages/UserSettingsPage/TokensPage/TokensPageView.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { useTheme } from "@mui/styles";
21
import Table from "@mui/material/Table";
32
import TableBody from "@mui/material/TableBody";
43
import TableCell from "@mui/material/TableCell";
@@ -11,9 +10,10 @@ import { TableEmpty } from "components/TableEmpty/TableEmpty";
1110
import { TableLoader } from "components/TableLoader/TableLoader";
1211
import DeleteOutlineIcon from "@mui/icons-material/DeleteOutline";
1312
import dayjs from "dayjs";
14-
import { FC } from "react";
13+
import { useTheme } from "@emotion/react";
14+
import { type FC, type ReactNode } from "react";
1515
import IconButton from "@mui/material/IconButton/IconButton";
16-
import { APIKeyWithOwner } from "api/typesGenerated";
16+
import type { APIKeyWithOwner } from "api/typesGenerated";
1717
import relativeTime from "dayjs/plugin/relativeTime";
1818
import { ErrorAlert } from "components/Alert/ErrorAlert";
1919

@@ -32,11 +32,10 @@ export interface TokensPageViewProps {
3232
hasLoaded: boolean;
3333
onDelete: (token: APIKeyWithOwner) => void;
3434
deleteTokenError?: unknown;
35+
children?: ReactNode;
3536
}
3637

37-
export const TokensPageView: FC<
38-
React.PropsWithChildren<TokensPageViewProps>
39-
> = ({
38+
export const TokensPageView: FC<TokensPageViewProps> = ({
4039
tokens,
4140
getTokensError,
4241
isLoading,

0 commit comments

Comments
 (0)