@devrongx/games 0.4.27 → 0.4.29
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/package.json
CHANGED
|
@@ -165,20 +165,12 @@ export const PreMatchGame = ({
|
|
|
165
165
|
}, [config.markets, activeFilters, ignoredMarkets, bets]);
|
|
166
166
|
|
|
167
167
|
const handleExpandAll = useCallback(() => {
|
|
168
|
-
setCollapsedMarkets(
|
|
169
|
-
|
|
170
|
-
for (const i of visibleMarketIndices) next.delete(i);
|
|
171
|
-
return next;
|
|
172
|
-
});
|
|
173
|
-
}, [visibleMarketIndices]);
|
|
168
|
+
setCollapsedMarkets(new Set());
|
|
169
|
+
}, []);
|
|
174
170
|
|
|
175
171
|
const handleCollapseAll = useCallback(() => {
|
|
176
|
-
setCollapsedMarkets(
|
|
177
|
-
|
|
178
|
-
for (const i of visibleMarketIndices) next.add(i);
|
|
179
|
-
return next;
|
|
180
|
-
});
|
|
181
|
-
}, [visibleMarketIndices]);
|
|
172
|
+
setCollapsedMarkets(new Set(config.markets.map((_, i) => i)));
|
|
173
|
+
}, [config.markets]);
|
|
182
174
|
|
|
183
175
|
// Category headers — only shown when no sort is active
|
|
184
176
|
const categoryForIndex = useMemo(() => {
|
|
@@ -229,9 +221,12 @@ export const PreMatchGame = ({
|
|
|
229
221
|
|
|
230
222
|
// ── Helper: is a market's options clickable? ─────────────────────────────
|
|
231
223
|
const isMarketInteractive = useCallback((mIdx: number) => {
|
|
232
|
-
if (!hasSubmitted) return true;
|
|
233
|
-
|
|
234
|
-
|
|
224
|
+
if (!hasSubmitted) return true;
|
|
225
|
+
// Post-submit: markets without a submitted bet stay interactive (new bets allowed)
|
|
226
|
+
if (!submittedBets?.[mIdx]) return true;
|
|
227
|
+
// Markets with a submitted bet: only interactive when in editing mode
|
|
228
|
+
return editingMarkets.has(mIdx);
|
|
229
|
+
}, [hasSubmitted, submittedBets, editingMarkets]);
|
|
235
230
|
|
|
236
231
|
// ── Render ───────────────────────────────────────────────────────────────
|
|
237
232
|
|
|
@@ -44,7 +44,7 @@ export const FilterPill = ({ label, active = false, onClick }: { label: string;
|
|
|
44
44
|
}}
|
|
45
45
|
>
|
|
46
46
|
<motion.div
|
|
47
|
-
className="absolute inset-0 rounded-full"
|
|
47
|
+
className="absolute inset-0 rounded-full pointer-events-none"
|
|
48
48
|
initial={false}
|
|
49
49
|
animate={{ scaleX: active ? 1 : 0, opacity: active ? 1 : 0 }}
|
|
50
50
|
transition={{ duration: 0.25, ease: "easeOut" }}
|