@dubsdotapp/expo 0.2.38 → 0.2.39
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 +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/ui/game/ClaimPrizeSheet.tsx +9 -4
package/package.json
CHANGED
|
@@ -21,6 +21,8 @@ export interface ClaimPrizeSheetProps {
|
|
|
21
21
|
gameId: string;
|
|
22
22
|
/** Prize amount in SOL */
|
|
23
23
|
prizeAmount: number;
|
|
24
|
+
/** When true, shows refund language instead of prize language */
|
|
25
|
+
isRefund?: boolean;
|
|
24
26
|
/** Callbacks */
|
|
25
27
|
onSuccess?: (result: ClaimMutationResult) => void;
|
|
26
28
|
onError?: (error: Error) => void;
|
|
@@ -38,6 +40,7 @@ export function ClaimPrizeSheet({
|
|
|
38
40
|
onDismiss,
|
|
39
41
|
gameId,
|
|
40
42
|
prizeAmount,
|
|
43
|
+
isRefund = false,
|
|
41
44
|
onSuccess,
|
|
42
45
|
onError,
|
|
43
46
|
}: ClaimPrizeSheetProps) {
|
|
@@ -148,7 +151,9 @@ export function ClaimPrizeSheet({
|
|
|
148
151
|
{/* Header */}
|
|
149
152
|
<View style={styles.header}>
|
|
150
153
|
<Text style={[styles.headerTitle, { color: t.text }]}>
|
|
151
|
-
{showCelebration
|
|
154
|
+
{showCelebration
|
|
155
|
+
? (isRefund ? 'Refund Claimed!' : 'Prize Claimed!')
|
|
156
|
+
: (isRefund ? 'Claim Refund' : 'Claim Prize')}
|
|
152
157
|
</Text>
|
|
153
158
|
<TouchableOpacity onPress={onDismiss} activeOpacity={0.8}>
|
|
154
159
|
<Text style={[styles.closeButton, { color: t.textMuted }]}>{'\u2715'}</Text>
|
|
@@ -171,7 +176,7 @@ export function ClaimPrizeSheet({
|
|
|
171
176
|
+{prizeAmount} SOL
|
|
172
177
|
</Text>
|
|
173
178
|
<Text style={[styles.celebrationSubtext, { color: t.textMuted }]}>
|
|
174
|
-
Winnings sent to your wallet
|
|
179
|
+
{isRefund ? 'Refund sent to your wallet' : 'Winnings sent to your wallet'}
|
|
175
180
|
</Text>
|
|
176
181
|
</Animated.View>
|
|
177
182
|
)}
|
|
@@ -180,7 +185,7 @@ export function ClaimPrizeSheet({
|
|
|
180
185
|
{!showCelebration && (
|
|
181
186
|
<View style={[styles.summaryCard, { backgroundColor: t.surface, borderColor: t.border }]}>
|
|
182
187
|
<View style={styles.summaryRow}>
|
|
183
|
-
<Text style={[styles.summaryLabel, { color: t.textMuted }]}>Prize</Text>
|
|
188
|
+
<Text style={[styles.summaryLabel, { color: t.textMuted }]}>{isRefund ? 'Refund' : 'Prize'}</Text>
|
|
184
189
|
<Text style={[styles.summaryValue, { color: t.success }]}>
|
|
185
190
|
{prizeAmount} SOL
|
|
186
191
|
</Text>
|
|
@@ -223,7 +228,7 @@ export function ClaimPrizeSheet({
|
|
|
223
228
|
</View>
|
|
224
229
|
) : (
|
|
225
230
|
<Text style={[styles.ctaText, !canClaim && { opacity: 0.5 }]}>
|
|
226
|
-
Claim Prize — {prizeAmount} SOL
|
|
231
|
+
{isRefund ? 'Claim Refund' : 'Claim Prize'} — {prizeAmount} SOL
|
|
227
232
|
</Text>
|
|
228
233
|
)}
|
|
229
234
|
</TouchableOpacity>
|