mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
fix(site): fix loading spinner on template version status badge (#11392)
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import { type TemplateVersion } from "api/typesGenerated";
|
||||
import { type FC, type ReactNode } from "react";
|
||||
import CircularProgress from "@mui/material/CircularProgress";
|
||||
import ErrorIcon from "@mui/icons-material/ErrorOutline";
|
||||
import CheckIcon from "@mui/icons-material/CheckOutlined";
|
||||
import { Pill, type PillType } from "components/Pill/Pill";
|
||||
import { Pill, PillSpinner, type PillType } from "components/Pill/Pill";
|
||||
|
||||
interface TemplateVersionStatusBadgeProps {
|
||||
version: TemplateVersion;
|
||||
@@ -20,10 +19,6 @@ export const TemplateVersionStatusBadge: FC<
|
||||
);
|
||||
};
|
||||
|
||||
const LoadingIcon: FC = () => {
|
||||
return <CircularProgress size={10} style={{ color: "#FFF" }} />;
|
||||
};
|
||||
|
||||
export const getStatus = (
|
||||
version: TemplateVersion,
|
||||
): {
|
||||
@@ -36,19 +31,19 @@ export const getStatus = (
|
||||
return {
|
||||
type: "info",
|
||||
text: "Running",
|
||||
icon: <LoadingIcon />,
|
||||
icon: <PillSpinner />,
|
||||
};
|
||||
case "pending":
|
||||
return {
|
||||
type: "info",
|
||||
text: "Pending",
|
||||
icon: <LoadingIcon />,
|
||||
icon: <PillSpinner />,
|
||||
};
|
||||
case "canceling":
|
||||
return {
|
||||
type: "warning",
|
||||
text: "Canceling",
|
||||
icon: <LoadingIcon />,
|
||||
icon: <PillSpinner />,
|
||||
};
|
||||
case "canceled":
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user