import { DepositsRep } from "@/api/user";
import Box from "@/components/Box";
import { timeFormat } from "@/utils/methods";

type Props = {
    data: DepositsRep[];
};
const Message = (props: Props) => {
    const { data = [] } = props;

    return (
        <>
            {data.map((item, i) => {
                return (
                    <Box key={i} className={"border-b-[1px] border-[#333333] text-[14px]"}>
                        <div className={"flex justify-between pb-[0.0694rem]"}>
                            <p>{item.title}</p>
                            <p>
                                <span className={"text-[green]"}>+ {item.amount}</span>
                                {/*<span className={"text-[#acacac]"}></span>*/}
                            </p>
                        </div>
                        <div className={"text-[12px flex justify-between text-[#acacac]"}>
                            <p>{timeFormat(item.time)}</p>
                            <p>{item.status}</p>
                        </div>
                    </Box>
                );
            })}
        </>
    );
};

export default Message;
