@dubsdotapp/expo 0.5.5 → 0.5.6
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.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/ui/game/JoinGameSheet.tsx +5 -2
package/package.json
CHANGED
|
@@ -30,6 +30,8 @@ export interface JoinGameSheetProps {
|
|
|
30
30
|
/** Callbacks */
|
|
31
31
|
onSuccess?: (result: JoinGameMutationResult) => void;
|
|
32
32
|
onError?: (error: Error) => void;
|
|
33
|
+
/** Called when the user taps a team card (useful for sound/haptics) */
|
|
34
|
+
onTeamSelect?: (team: 'home' | 'away') => void;
|
|
33
35
|
/** Pool mode: hides team selection, auto-assigns team, shows "Join Pool" labels */
|
|
34
36
|
isPoolModeEnabled?: boolean;
|
|
35
37
|
}
|
|
@@ -53,6 +55,7 @@ export function JoinGameSheet({
|
|
|
53
55
|
awayColor = '#EF4444',
|
|
54
56
|
onSuccess,
|
|
55
57
|
onError,
|
|
58
|
+
onTeamSelect,
|
|
56
59
|
isPoolModeEnabled = false,
|
|
57
60
|
}: JoinGameSheetProps) {
|
|
58
61
|
const t = useDubsTheme();
|
|
@@ -194,7 +197,7 @@ export function JoinGameSheet({
|
|
|
194
197
|
bets={homeBets}
|
|
195
198
|
color={homeColor}
|
|
196
199
|
selected={selectedTeam === 'home'}
|
|
197
|
-
onPress={() => setSelectedTeam('home')}
|
|
200
|
+
onPress={() => { setSelectedTeam('home'); onTeamSelect?.('home'); }}
|
|
198
201
|
ImageComponent={ImageComponent}
|
|
199
202
|
t={t}
|
|
200
203
|
/>
|
|
@@ -205,7 +208,7 @@ export function JoinGameSheet({
|
|
|
205
208
|
bets={awayBets}
|
|
206
209
|
color={awayColor}
|
|
207
210
|
selected={selectedTeam === 'away'}
|
|
208
|
-
onPress={() => setSelectedTeam('away')}
|
|
211
|
+
onPress={() => { setSelectedTeam('away'); onTeamSelect?.('away'); }}
|
|
209
212
|
ImageComponent={ImageComponent}
|
|
210
213
|
t={t}
|
|
211
214
|
/>
|