Skip to content

Commit 98b97e3

Browse files
committed
Fix missed places
1 parent 8fe9719 commit 98b97e3

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

site/src/pages/CreateTemplatePage/CreateTemplatePage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { useMachine } from "@xstate/react"
22
import { isApiValidationError } from "api/errors"
3-
import { Alert } from "components/Alert/Alert"
43
import { Maybe } from "components/Conditionals/Maybe"
54
import { useDashboard } from "components/Dashboard/DashboardProvider"
65
import { FullPageHorizontalForm } from "components/FullPageForm/FullPageHorizontalForm"
@@ -14,6 +13,7 @@ import { useNavigate, useSearchParams } from "react-router-dom"
1413
import { pageTitle } from "utils/page"
1514
import { createTemplateMachine } from "xServices/createTemplate/createTemplateXService"
1615
import { CreateTemplateForm } from "./CreateTemplateForm"
16+
import { ErrorAlert } from "components/Alert/ErrorAlert"
1717

1818
const CreateTemplatePage: FC = () => {
1919
const { t } = useTranslation("createTemplatePage")
@@ -64,7 +64,7 @@ const CreateTemplatePage: FC = () => {
6464

6565
<Stack spacing={6}>
6666
<Maybe condition={Boolean(error && !isApiValidationError(error))}>
67-
<Alert error={error} severity="error" />
67+
<ErrorAlert error={error} />
6868
</Maybe>
6969

7070
{shouldDisplayForm && (

site/src/pages/DeploySettingsPage/GeneralSettingsPage/GeneralSettingsPageView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { DeploymentOption } from "api/types"
22
import { DeploymentDAUsResponse } from "api/typesGenerated"
3-
import { Alert } from "components/Alert/Alert"
3+
import { ErrorAlert } from "components/Alert/ErrorAlert"
44
import { DAUChart } from "components/DAUChart/DAUChart"
55
import { Header } from "components/DeploySettingsLayout/Header"
66
import OptionsTable from "components/DeploySettingsLayout/OptionsTable"
@@ -26,7 +26,7 @@ export const GeneralSettingsPageView = ({
2626
/>
2727
<Stack spacing={4}>
2828
{Boolean(getDeploymentDAUsError) && (
29-
<Alert error={getDeploymentDAUsError} severity="error" />
29+
<ErrorAlert error={getDeploymentDAUsError} />
3030
)}
3131
{deploymentDAUs && <DAUChart daus={deploymentDAUs} />}
3232
<OptionsTable

site/src/pages/DeploySettingsPage/LicensesSettingsPage/AddNewLicensePageView.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import Button from "@mui/material/Button"
22
import TextField from "@mui/material/TextField"
33
import { makeStyles } from "@mui/styles"
4-
import { Alert } from "components/Alert/Alert"
54
import { Fieldset } from "components/DeploySettingsLayout/Fieldset"
65
import { Header } from "components/DeploySettingsLayout/Header"
76
import { FileUpload } from "components/FileUpload/FileUpload"
@@ -11,6 +10,7 @@ import { Stack } from "components/Stack/Stack"
1110
import { DividerWithText } from "pages/DeploySettingsPage/LicensesSettingsPage/DividerWithText"
1211
import { FC } from "react"
1312
import { Link as RouterLink } from "react-router-dom"
13+
import { ErrorAlert } from "components/Alert/ErrorAlert"
1414

1515
type AddNewLicenseProps = {
1616
onSaveLicenseKey: (license: string) => void
@@ -66,9 +66,7 @@ export const AddNewLicensePageView: FC<AddNewLicenseProps> = ({
6666
</Button>
6767
</Stack>
6868

69-
{savingLicenseError && (
70-
<Alert severity="error" error={savingLicenseError}></Alert>
71-
)}
69+
{savingLicenseError && <ErrorAlert error={savingLicenseError} />}
7270

7371
<FileUpload
7472
isUploading={isUploading}

site/src/pages/TemplateVersionPage/TemplateVersionPageView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import Button from "@mui/material/Button"
22
import Link from "@mui/material/Link"
33
import EditIcon from "@mui/icons-material/Edit"
4-
import { Alert } from "components/Alert/Alert"
54
import { Loader } from "components/Loader/Loader"
65
import { Margins } from "components/Margins/Margins"
76
import {
@@ -18,6 +17,7 @@ import { useTranslation } from "react-i18next"
1817
import { Link as RouterLink } from "react-router-dom"
1918
import { createDayString } from "utils/createDayString"
2019
import { TemplateVersionMachineContext } from "xServices/templateVersion/templateVersionXService"
20+
import { ErrorAlert } from "components/Alert/ErrorAlert"
2121

2222
export interface TemplateVersionPageViewProps {
2323
/**
@@ -57,7 +57,7 @@ export const TemplateVersionPageView: FC<TemplateVersionPageViewProps> = ({
5757
{!currentFiles && !error && <Loader />}
5858

5959
<Stack spacing={4}>
60-
{Boolean(error) && <Alert severity="error" error={error} />}
60+
{Boolean(error) && <ErrorAlert error={error} />}
6161
{currentVersion && currentFiles && (
6262
<>
6363
<Stats>

0 commit comments

Comments
 (0)