import { createColumnHelper } from "@tanstack/react-table" import { AdminCampaign } from "@medusajs/types" import { useMemo } from "react" import { useTranslation } from "react-i18next" import { DateCell } from "../../../components/table/table-cells/common/date-cell" import { TextCell, TextHeader, } from "../../../components/table/table-cells/common/text-cell" import { DescriptionCell, DescriptionHeader, } from "../../../components/table/table-cells/sales-channel/description-cell" import { NameCell, NameHeader, } from "../../../components/table/table-cells/sales-channel/name-cell" const columnHelper = createColumnHelper() export const useCampaignTableColumns = () => { const { t } = useTranslation() return useMemo( () => [ columnHelper.accessor("name", { header: () => , cell: ({ getValue }) => , }), columnHelper.accessor("description", { header: () => , cell: ({ getValue }) => , }), columnHelper.accessor("campaign_identifier", { header: () => , cell: ({ getValue }) => { const value = getValue() return }, }), columnHelper.accessor("starts_at", { header: () => , cell: ({ getValue }) => { const value = getValue() if (!value) { return } const date = new Date(value) return }, }), columnHelper.accessor("ends_at", { header: () => , cell: ({ getValue }) => { const value = getValue() if (!value) { return } const date = new Date(value) return }, }), ], [t] ) }