@sensiblestats/widget-react 0.87.0 → 0.88.0
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 +11 -0
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -6288,10 +6288,12 @@ function FormDots({ form, ui }) {
|
|
|
6288
6288
|
}
|
|
6289
6289
|
function MonitorFormH2H({ formAndH2H, homeTeamName, awayTeamName, ui }) {
|
|
6290
6290
|
const [expanded, setExpanded] = useState32(false);
|
|
6291
|
-
const { homeForm, awayForm, h2h } = formAndH2H;
|
|
6291
|
+
const { homeForm, awayForm, h2h, homeShortCode, awayShortCode } = formAndH2H;
|
|
6292
6292
|
if (homeForm.length === 0 && awayForm.length === 0 && !h2h) {
|
|
6293
6293
|
return /* @__PURE__ */ jsx53(Fragment8, {});
|
|
6294
6294
|
}
|
|
6295
|
+
const homeLabel = homeShortCode || homeTeamName;
|
|
6296
|
+
const awayLabel = awayShortCode || awayTeamName;
|
|
6295
6297
|
const total = h2h ? h2h.wins + h2h.draws + h2h.losses : 0;
|
|
6296
6298
|
const winsPct = total > 0 && h2h ? h2h.wins / total * 100 : 0;
|
|
6297
6299
|
const drawsPct = total > 0 && h2h ? h2h.draws / total * 100 : 0;
|
|
@@ -6322,11 +6324,11 @@ function MonitorFormH2H({ formAndH2H, homeTeamName, awayTeamName, ui }) {
|
|
|
6322
6324
|
expanded && /* @__PURE__ */ jsxs48("div", { className: "ss-w-h2h-body", children: [
|
|
6323
6325
|
/* @__PURE__ */ jsxs48("div", { className: "ss-w-h2h-forms", children: [
|
|
6324
6326
|
/* @__PURE__ */ jsxs48("div", { className: "ss-w-h2h-form-col", children: [
|
|
6325
|
-
/* @__PURE__ */ jsx53("span", { className: "ss-w-h2h-form-team", children:
|
|
6327
|
+
/* @__PURE__ */ jsx53("span", { className: "ss-w-h2h-form-team", children: homeLabel }),
|
|
6326
6328
|
/* @__PURE__ */ jsx53(FormDots, { form: homeForm, ui })
|
|
6327
6329
|
] }),
|
|
6328
6330
|
/* @__PURE__ */ jsxs48("div", { className: "ss-w-h2h-form-col ss-w-h2h-form-col--away", children: [
|
|
6329
|
-
/* @__PURE__ */ jsx53("span", { className: "ss-w-h2h-form-team", children:
|
|
6331
|
+
/* @__PURE__ */ jsx53("span", { className: "ss-w-h2h-form-team", children: awayLabel }),
|
|
6330
6332
|
/* @__PURE__ */ jsx53(FormDots, { form: awayForm, ui })
|
|
6331
6333
|
] })
|
|
6332
6334
|
] }),
|