All files / src/app/admin/components/_components StatusBadge.tsx

100% Statements 3/3
50% Branches 1/2
100% Functions 1/1
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 191x           61x 61x                      
"use client";
 
import { STATUS_COLORS } from "./constants";
import { useT } from "@/lib/i18n/translate";
 
export function StatusBadge({ status }: { status: string }) {
  const t = useT("admin");
  return (
    <span className="flex items-center gap-1.5">
      <span
        className={`w-2 h-2 rounded-full ${
          STATUS_COLORS[status] || STATUS_COLORS.unknown
        }`}
      />
      <span className="text-xs capitalize">{t(status)}</span>
    </span>
  );
}