@rsc-labs/medusa-store-analytics-v2
Version:
Get analytics data about your store
23 lines (22 loc) • 1.66 kB
JavaScript
import { jsxs, jsx } from "react/jsx-runtime";
import { Heading, Text } from "@medusajs/ui";
import { Grid, Divider } from "@mui/material";
const DiscountsTopTable = ({ tableRows }) => {
return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
/* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(Divider, {}) }),
/* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsxs(Grid, { container: true, justifyContent: "space-between", children: [
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(Heading, { level: "h3", children: "Discount" }) }),
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(Heading, { level: "h3", children: "Count" }) })
] }) }),
tableRows.length > 0 ? tableRows.map((tableRow) => /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsxs(Grid, { container: true, justifyContent: "space-between", children: [
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(Text, { children: tableRow.discountCode }) }),
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(Text, { children: tableRow.sum }) })
] }) })) : /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsxs(Grid, { container: true, justifyContent: "space-between", children: [
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(Text, { children: "None" }) }),
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(Text, { children: "None" }) })
] }) })
] });
};
export {
DiscountsTopTable
};