@dubsdotapp/expo 0.5.34 → 0.5.35
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/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/hooks/useCreateGame.ts +9 -1
package/package.json
CHANGED
|
@@ -102,6 +102,14 @@ export function useCreateGame() {
|
|
|
102
102
|
'Draw';
|
|
103
103
|
|
|
104
104
|
const message = `I just placed a ${wagerAmount} SOL bet on ${teamLabel} - Join me!`;
|
|
105
|
+
// event.startTime is an ESPN-unified ISO string ("…Z"), but every
|
|
106
|
+
// downstream chat consumer (dubs.app SPA, mobile app) does
|
|
107
|
+
// `new Date(strTimestamp + 'Z')` and crashes on the resulting
|
|
108
|
+
// double-Z. Strip the trailing Z so the on-the-wire shape matches
|
|
109
|
+
// the legacy TheSportsDB format the rest of the system expects.
|
|
110
|
+
const strTimestamp = typeof event?.startTime === 'string'
|
|
111
|
+
? event.startTime.replace(/Z$/, '')
|
|
112
|
+
: null;
|
|
105
113
|
const gameInvite = {
|
|
106
114
|
gameId: createResult.gameId,
|
|
107
115
|
gameAddress: createResult.gameAddress,
|
|
@@ -117,7 +125,7 @@ export function useCreateGame() {
|
|
|
117
125
|
imageUrl: event?.media?.thumbnail ?? null,
|
|
118
126
|
strThumb: event?.media?.thumbnail ?? null,
|
|
119
127
|
strPoster: event?.media?.poster ?? null,
|
|
120
|
-
strTimestamp
|
|
128
|
+
strTimestamp,
|
|
121
129
|
creatorTeam: params.teamChoice,
|
|
122
130
|
creatorWallet: params.playerWallet,
|
|
123
131
|
} as Record<string, unknown>;
|