@sensiblestats/widget-react 0.29.1 → 0.29.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @sensiblestats/widget-react
2
2
 
3
+ ## 0.29.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 4eed68b: Fix the post-match "Match stats" card rendering each team's stats under the opposite team. The row values are club-first, but the card was always drawing the club value on the left while the result card above renders home-left/away-right — so when the club played away (e.g. Liverpool at Ipswich) the club's stats appeared under the home team. The card now orients by venue via a new `clubIsHome` field, matching the result card.
8
+ - Updated dependencies [4eed68b]
9
+ - @sensiblestats/widget-sdk@0.25.1
10
+
3
11
  ## 0.29.1
4
12
 
5
13
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1727,11 +1727,15 @@ var import_jsx_runtime27 = require("react/jsx-runtime");
1727
1727
  function PostMatchStatsCard({ card, onTap }) {
1728
1728
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("button", { type: "button", className: "ss-w-fandash-card ss-w-fandash-card--tap ss-w-fandash-postmatch-stats", onClick: () => onTap(card), children: [
1729
1729
  card.title ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "ss-w-fandash-eyebrow", children: card.title }) : null,
1730
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "ss-w-fandash-postmatch-stat-rows", children: card.data.rows.map((r, i) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "ss-w-fandash-postmatch-stat-row", children: [
1731
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "ss-w-fandash-postmatch-stat-value", children: r.clubValue }),
1732
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "ss-w-fandash-postmatch-stat-label", children: r.label }),
1733
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "ss-w-fandash-postmatch-stat-value", children: r.oppValue })
1734
- ] }, `${r.label}-${i}`)) }),
1730
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "ss-w-fandash-postmatch-stat-rows", children: card.data.rows.map((r, i) => {
1731
+ const leftValue = card.data.clubIsHome ? r.clubValue : r.oppValue;
1732
+ const rightValue = card.data.clubIsHome ? r.oppValue : r.clubValue;
1733
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "ss-w-fandash-postmatch-stat-row", children: [
1734
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "ss-w-fandash-postmatch-stat-value", children: leftValue }),
1735
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "ss-w-fandash-postmatch-stat-label", children: r.label }),
1736
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "ss-w-fandash-postmatch-stat-value", children: rightValue })
1737
+ ] }, `${r.label}-${i}`);
1738
+ }) }),
1735
1739
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "ss-w-fandash-card-cta", children: card.actionLabel })
1736
1740
  ] });
1737
1741
  }