|
| 1 | +import { type Interpolation, type Theme } from "@emotion/react"; |
1 | 2 | import Button from "@mui/material/Button";
|
2 |
| -import { makeStyles, useTheme } from "@mui/styles"; |
| 3 | +import { useTheme } from "@mui/styles"; |
3 | 4 | import Skeleton from "@mui/material/Skeleton";
|
4 | 5 | import AddIcon from "@mui/icons-material/AddOutlined";
|
5 | 6 | import RefreshIcon from "@mui/icons-material/Refresh";
|
6 |
| -import { GetLicensesResponse } from "api/api"; |
| 7 | +import type { GetLicensesResponse } from "api/api"; |
7 | 8 | import { Header } from "components/DeploySettingsLayout/Header";
|
8 | 9 | import { LicenseCard } from "./LicenseCard";
|
9 | 10 | import { Stack } from "components/Stack/Stack";
|
10 |
| -import { FC } from "react"; |
| 11 | +import { type FC } from "react"; |
11 | 12 | import Confetti from "react-confetti";
|
12 | 13 | import { Link } from "react-router-dom";
|
13 | 14 | import useWindowSize from "react-use/lib/useWindowSize";
|
@@ -38,10 +39,8 @@ const LicensesSettingsPageView: FC<Props> = ({
|
38 | 39 | removeLicense,
|
39 | 40 | refreshEntitlements,
|
40 | 41 | }) => {
|
41 |
| - const styles = useStyles(); |
42 |
| - const { width, height } = useWindowSize(); |
43 |
| - |
44 | 42 | const theme = useTheme();
|
| 43 | + const { width, height } = useWindowSize(); |
45 | 44 |
|
46 | 45 | return (
|
47 | 46 | <>
|
@@ -130,27 +129,27 @@ const LicensesSettingsPageView: FC<Props> = ({
|
130 | 129 | );
|
131 | 130 | };
|
132 | 131 |
|
133 |
| -const useStyles = makeStyles((theme) => ({ |
134 |
| - title: { |
| 132 | +const styles = { |
| 133 | + title: (theme) => ({ |
135 | 134 | fontSize: theme.spacing(2),
|
136 |
| - }, |
| 135 | + }), |
137 | 136 |
|
138 |
| - root: { |
| 137 | + root: (theme) => ({ |
139 | 138 | minHeight: theme.spacing(30),
|
140 | 139 | display: "flex",
|
141 | 140 | alignItems: "center",
|
142 | 141 | justifyContent: "center",
|
143 | 142 | borderRadius: theme.shape.borderRadius,
|
144 | 143 | border: `1px solid ${theme.palette.divider}`,
|
145 | 144 | padding: theme.spacing(6),
|
146 |
| - }, |
| 145 | + }), |
147 | 146 |
|
148 |
| - description: { |
| 147 | + description: (theme) => ({ |
149 | 148 | color: theme.palette.text.secondary,
|
150 | 149 | textAlign: "center",
|
151 | 150 | maxWidth: theme.spacing(58),
|
152 | 151 | marginTop: theme.spacing(1),
|
153 |
| - }, |
154 |
| -})); |
| 152 | + }), |
| 153 | +} satisfies Record<string, Interpolation<Theme>>; |
155 | 154 |
|
156 | 155 | export default LicensesSettingsPageView;
|
0 commit comments