import moment from "moment"
import { useMemo } from "react"
import { useTranslation } from "react-i18next"
import { getColor } from "../../../utils/color"
import CustomerAvatarItem from "../../molecules/customer-avatar-item"
export const useCustomerColumns = () => {
const { t } = useTranslation()
const columns = useMemo(
() => [
{
Header: t("customer-table-date-added", "Date added"),
accessor: "created_at", // accessor is the "key" in the data
Cell: ({ cell: { value } }) => moment(value).format("DD MMM YYYY"),
},
{
Header: t("customer-table-name", "Name"),
accessor: "customer",
Cell: ({ row }) => (