1 import { HttpTypes } from "@medusajs/types"
2 import { getPromotionStatus } from "../../../../../lib/promotions"
3 import { StatusCell as StatusCell_ } from "../../common/status-cell"
4
5 type PromotionCellProps = {
6 promotion: HttpTypes.AdminPromotion
7 }
8
9 export const StatusCell = ({ promotion }: PromotionCellProps) => {
10 const [color, text] = getPromotionStatus(promotion)
11
12 return <StatusCell_ color={color}>{text}</StatusCell_>
13 }