@sensiblestats/widget-react 0.47.0 → 0.47.1
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 +8 -0
- package/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1538,6 +1538,9 @@ function displayMinute(state, nowMs) {
|
|
|
1538
1538
|
const advanced = base + Math.floor(age / 6e4);
|
|
1539
1539
|
return `${advanced}'`;
|
|
1540
1540
|
}
|
|
1541
|
+
function isTreatedLive(state, pollStale, nowMs) {
|
|
1542
|
+
return state?.phase === "live" && !pollStale && !isReadingStale(state, nowMs);
|
|
1543
|
+
}
|
|
1541
1544
|
|
|
1542
1545
|
// src/useMatchDiscovery.ts
|
|
1543
1546
|
var POLL_MS = 6e4;
|
|
@@ -3760,7 +3763,7 @@ function FixtureRow({ match, state, stale, nowMs, ui, monitor }) {
|
|
|
3760
3763
|
// src/components/CompetitionGroup.tsx
|
|
3761
3764
|
import { jsx as jsx50, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
3762
3765
|
function CompetitionGroup({ group, open, onToggle, states, stale, nowMs, ui, monitor, disambiguate = false }) {
|
|
3763
|
-
const own = group.matches.filter((m) => states[m.matchId]
|
|
3766
|
+
const own = group.matches.filter((m) => !isTreatedLive(states[m.matchId], stale, nowMs));
|
|
3764
3767
|
const hasLive = own.length !== group.matches.length;
|
|
3765
3768
|
return /* @__PURE__ */ jsxs45("div", { className: "ss-w-grp", children: [
|
|
3766
3769
|
/* @__PURE__ */ jsxs45("button", { type: "button", className: "ss-w-grp-head", "aria-expanded": open, onClick: onToggle, children: [
|
|
@@ -3784,7 +3787,7 @@ function CompetitionGroup({ group, open, onToggle, states, stale, nowMs, ui, mon
|
|
|
3784
3787
|
import { Fragment as Fragment7, jsx as jsx51, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
3785
3788
|
function TodayPanel({ discovery, ui, monitor }) {
|
|
3786
3789
|
const { groups, states, nowMs, stale, expanded, toggleGroup } = discovery;
|
|
3787
|
-
const liveRows = stale ? [] : groups.flatMap((group) => group.matches.filter((m) => states[m.matchId]
|
|
3790
|
+
const liveRows = stale ? [] : groups.flatMap((group) => group.matches.filter((m) => isTreatedLive(states[m.matchId], stale, nowMs)).map((match) => ({ match, rank: group.rank }))).sort((a, b) => a.rank - b.rank);
|
|
3788
3791
|
const nameCounts = groups.reduce((acc, g) => {
|
|
3789
3792
|
acc[g.competitionName] = (acc[g.competitionName] ?? 0) + 1;
|
|
3790
3793
|
return acc;
|