mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
refactor: Form page loaders (#5762)
This commit is contained in:
@@ -13,8 +13,8 @@ import * as Yup from "yup"
|
||||
import { AlertBanner } from "components/AlertBanner/AlertBanner"
|
||||
import { makeStyles } from "@material-ui/core/styles"
|
||||
import { FullPageHorizontalForm } from "components/FullPageForm/FullPageHorizontalForm"
|
||||
import { FullScreenLoader } from "components/Loader/FullScreenLoader"
|
||||
import { SelectedTemplate } from "./SelectedTemplate"
|
||||
import { Loader } from "components/Loader/Loader"
|
||||
|
||||
export enum CreateWorkspaceErrors {
|
||||
GET_TEMPLATES_ERROR = "getTemplatesError",
|
||||
@@ -101,7 +101,7 @@ export const CreateWorkspacePageView: FC<
|
||||
)
|
||||
|
||||
if (isLoading) {
|
||||
return <FullScreenLoader />
|
||||
return <Loader />
|
||||
}
|
||||
|
||||
if (props.hasTemplateErrors) {
|
||||
|
||||
@@ -3,8 +3,8 @@ import { Group } from "api/typesGenerated"
|
||||
import { ChooseOne, Cond } from "components/Conditionals/ChooseOne"
|
||||
import { FormFooter } from "components/FormFooter/FormFooter"
|
||||
import { FullPageForm } from "components/FullPageForm/FullPageForm"
|
||||
import { Loader } from "components/Loader/Loader"
|
||||
import { LazyIconField } from "components/IconField/LazyIconField"
|
||||
import { FullScreenLoader } from "components/Loader/FullScreenLoader"
|
||||
import { Margins } from "components/Margins/Margins"
|
||||
import { useFormik } from "formik"
|
||||
import { FC } from "react"
|
||||
@@ -104,7 +104,7 @@ export const SettingsGroupPageView: FC<SettingsGroupPageViewProps> = ({
|
||||
return (
|
||||
<ChooseOne>
|
||||
<Cond condition={isLoading}>
|
||||
<FullScreenLoader />
|
||||
<Loader />
|
||||
</Cond>
|
||||
|
||||
<Cond>
|
||||
|
||||
@@ -2,6 +2,7 @@ import { makeStyles } from "@material-ui/core/styles"
|
||||
import { useMachine } from "@xstate/react"
|
||||
import { AlertBanner } from "components/AlertBanner/AlertBanner"
|
||||
import { ConfirmDialog } from "components/Dialogs/ConfirmDialog/ConfirmDialog"
|
||||
import { Loader } from "components/Loader/Loader"
|
||||
import { Margins } from "components/Margins/Margins"
|
||||
import dayjs from "dayjs"
|
||||
import { scheduleToAutoStart } from "pages/WorkspaceSchedulePage/schedule"
|
||||
@@ -11,7 +12,6 @@ import { useTranslation } from "react-i18next"
|
||||
import { Navigate, useNavigate, useParams } from "react-router-dom"
|
||||
import { scheduleChanged } from "util/schedule"
|
||||
import * as TypesGen from "../../api/typesGenerated"
|
||||
import { FullScreenLoader } from "../../components/Loader/FullScreenLoader"
|
||||
import { WorkspaceScheduleForm } from "../../components/WorkspaceScheduleForm/WorkspaceScheduleForm"
|
||||
import { firstOrItem } from "../../util/array"
|
||||
import { workspaceSchedule } from "../../xServices/workspaceSchedule/workspaceScheduleXService"
|
||||
@@ -63,7 +63,7 @@ export const WorkspaceSchedulePage: FC = () => {
|
||||
}
|
||||
|
||||
if (scheduleState.hasTag("loading") || !template) {
|
||||
return <FullScreenLoader />
|
||||
return <Loader />
|
||||
}
|
||||
|
||||
if (scheduleState.matches("error")) {
|
||||
|
||||
Reference in New Issue
Block a user