Files
ironmount/app/client/modules/backups/components/backup-status-dot.tsx
Nico 6c30e7e357 Feat/notifications alerts (#52)
* feat: notifications backend & creation

* feat: assign notification to backup schedule

* refactor: status dot one component

* chore(notification-details): remove refetchInterval
2025-11-22 14:58:21 +01:00

31 lines
604 B
TypeScript

import { StatusDot } from "~/client/components/status-dot";
export const BackupStatusDot = ({
enabled,
hasError,
isInProgress,
}: {
enabled: boolean;
hasError?: boolean;
isInProgress?: boolean;
}) => {
let variant: "success" | "neutral" | "error" | "info";
let label: string;
if (isInProgress) {
variant = "info";
label = "Backup in progress";
} else if (hasError) {
variant = "error";
label = "Error";
} else if (enabled) {
variant = "success";
label = "Active";
} else {
variant = "neutral";
label = "Paused";
}
return <StatusDot variant={variant} label={label} />;
};