mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-29 07:48:02 +00:00
Enabled recommended-requiring-type-checking as result type fixes provided (#632)
* Enabled recommended-requiring-type-checking * from .cjs to .js * check * check * check * check * A lot of types aligned and refactored * More strict types * Improvement * Improvements * Improvements * Fixed routs * Fixed import types
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
import { AiOutlineReload } from "react-icons/ai";
|
||||
|
||||
type StatusLabelProps = {
|
||||
status: string;
|
||||
isRollback?: boolean;
|
||||
};
|
||||
|
||||
export enum DeploymentStatus {
|
||||
DEPLOYED = "deployed",
|
||||
FAILED = "failed",
|
||||
@@ -12,6 +7,11 @@ export enum DeploymentStatus {
|
||||
SUPERSEDED = "superseded",
|
||||
}
|
||||
|
||||
type StatusLabelProps = {
|
||||
status: DeploymentStatus;
|
||||
isRollback?: boolean;
|
||||
};
|
||||
|
||||
export function getStatusColor(status: DeploymentStatus) {
|
||||
if (status === DeploymentStatus.DEPLOYED) return "text-deployed";
|
||||
if (status === DeploymentStatus.FAILED) return "text-failed";
|
||||
@@ -20,7 +20,7 @@ export function getStatusColor(status: DeploymentStatus) {
|
||||
}
|
||||
|
||||
function StatusLabel({ status, isRollback }: StatusLabelProps) {
|
||||
const statusColor = getStatusColor(status as DeploymentStatus);
|
||||
const statusColor = getStatusColor(status);
|
||||
|
||||
return (
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user