@devrongx/games 0.4.28 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devrongx/games",
3
- "version": "0.4.28",
3
+ "version": "0.4.29",
4
4
  "description": "Game UI components for sports prediction markets",
5
5
  "license": "MIT",
6
6
  "main": "./src/index.ts",
@@ -221,9 +221,12 @@ export const PreMatchGame = ({
221
221
 
222
222
  // ── Helper: is a market's options clickable? ─────────────────────────────
223
223
  const isMarketInteractive = useCallback((mIdx: number) => {
224
- if (!hasSubmitted) return true; // fresh state: all markets interactive
225
- return editingMarkets.has(mIdx); // post-submit: only editing markets
226
- }, [hasSubmitted, editingMarkets]);
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]);
227
230
 
228
231
  // ── Render ───────────────────────────────────────────────────────────────
229
232