The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.
TypeScript b2b-marketplacecomposable-commerceecommerceenterpriseheadless-commercemarketplacemedusamedusajsmulti-vendortypescript
import { useTranslation } from "react-i18next"
import { MoneyAmountCell } from "../../common/money-amount-cell"
import { PlaceholderCell } from "../../common/placeholder-cell"
type TotalCellProps = {
currencyCode: string
total: number | null
className?: string
}
export const TotalCell = ({ currencyCode, total, className }: TotalCellProps) => {
if (!total) {
return <PlaceholderCell />
}
return (
<MoneyAmountCell currencyCode={currencyCode} amount={total} className={className} align="right" />
)
}
export const TotalHeader = () => {
const { t } = useTranslation()
return (
<div className="flex h-full w-full items-center justify-end">
<span className="truncate">{t("fields.total")}</span>
</div>
)
}