Skip to content

The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.

505 B
Raw Blame
import { HttpTypes } from "@medusajs/types";
import { getPromotionStatus } from "../../../../../lib/promotions";
import { DataTableStatusCell } from "@/components/data-table/components/data-table-status-cell/data-table-status-cell";

type PromotionCellProps = {
  promotion: HttpTypes.AdminPromotion;
};

export const StatusCell = ({ promotion }: PromotionCellProps) => {
  const [color, text] = getPromotionStatus(promotion);

  return <DataTableStatusCell color={color}>{text}</DataTableStatusCell>;
};