import { Text, clx } from "@medusajs/ui" import { useTranslation } from "react-i18next" import { useDate } from "../../../hooks/use-date" type DateRangeDisplayProps = { startsAt?: Date | string | null endsAt?: Date | string | null showTime?: boolean } export const DateRangeDisplay = ({ startsAt, endsAt, showTime = false, }: DateRangeDisplayProps) => { const startDate = startsAt ? new Date(startsAt) : null const endDate = endsAt ? new Date(endsAt) : null const { t } = useTranslation() const { getFullDate } = useDate() return (