import {Tag} from "antd";
import React from "react";
import {OrderStatusType} from "@/typings";


const OrderStatus = ({status}: { status?: OrderStatusType }) => {

    const colorMapping = {
        pending: 'warning',
        fail: 'error',
        success: 'success',
        processing: 'processing'
    }

    if(!status) return null;

    return (
        <Tag color={colorMapping[status]}>{status}</Tag>
    )
}

export default OrderStatus;
