chore: fix payment
This commit is contained in:
@@ -482,41 +482,15 @@ export default function CheckoutScreen() {
|
|||||||
{/* Méthode de paiement */}
|
{/* Méthode de paiement */}
|
||||||
{cryptoEnabled && (
|
{cryptoEnabled && (
|
||||||
<View style={styles.section}>
|
<View style={styles.section}>
|
||||||
<Text style={styles.sectionTitle}>Méthode de paiement</Text>
|
|
||||||
|
|
||||||
{cryptoOnly ? (
|
{cryptoOnly ? (
|
||||||
<View style={styles.cryptoOnlyBadge}>
|
|
||||||
<Ionicons name="logo-bitcoin" size={18} color={CRYPTO_COLOR} />
|
|
||||||
<Text style={styles.cryptoOnlyText}>
|
|
||||||
Paiement uniquement en cryptomonnaie
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
) : (
|
|
||||||
<View style={styles.paymentMethodRow}>
|
|
||||||
<TouchableOpacity
|
|
||||||
style={[styles.paymentMethodBtn, paymentMethod === "especes" && styles.paymentMethodBtnActive]}
|
|
||||||
onPress={() => setPaymentMethod("especes")}
|
|
||||||
>
|
|
||||||
<Ionicons name="cash-outline" size={22} color={paymentMethod === "especes" ? CRYPTO_COLOR : colors.textMuted} />
|
|
||||||
<Text style={[styles.paymentMethodBtnText, paymentMethod === "especes" && styles.paymentMethodBtnTextActive]}>
|
|
||||||
Espèces
|
|
||||||
</Text>
|
|
||||||
</TouchableOpacity>
|
|
||||||
<TouchableOpacity
|
|
||||||
style={[styles.paymentMethodBtn, paymentMethod === "crypto" && styles.paymentMethodBtnActive]}
|
|
||||||
onPress={() => setPaymentMethod("crypto")}
|
|
||||||
>
|
|
||||||
<Ionicons name="logo-bitcoin" size={22} color={paymentMethod === "crypto" ? CRYPTO_COLOR : colors.textMuted} />
|
|
||||||
<Text style={[styles.paymentMethodBtnText, paymentMethod === "crypto" && styles.paymentMethodBtnTextActive]}>
|
|
||||||
Crypto
|
|
||||||
</Text>
|
|
||||||
</TouchableOpacity>
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{paymentMethod === "crypto" && (
|
|
||||||
<>
|
<>
|
||||||
<Text style={styles.sectionTitle}>Cryptomonnaie</Text>
|
<Text style={styles.sectionTitle}>Cryptomonnaie</Text>
|
||||||
|
<View style={styles.cryptoOnlyBadge}>
|
||||||
|
<Ionicons name="logo-bitcoin" size={18} color={CRYPTO_COLOR} />
|
||||||
|
<Text style={styles.cryptoOnlyText}>
|
||||||
|
Paiement uniquement en cryptomonnaie
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
<View style={styles.currencyGrid}>
|
<View style={styles.currencyGrid}>
|
||||||
{cryptoCurrencies.map((c) => (
|
{cryptoCurrencies.map((c) => (
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
@@ -531,9 +505,54 @@ export default function CheckoutScreen() {
|
|||||||
))}
|
))}
|
||||||
</View>
|
</View>
|
||||||
<Text style={styles.cryptoHint}>
|
<Text style={styles.cryptoHint}>
|
||||||
Vous recevrez l'adresse wallet après validation
|
Choisissez la devise avec laquelle vous souhaitez payer
|
||||||
</Text>
|
</Text>
|
||||||
</>
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<Text style={styles.sectionTitle}>Méthode de paiement</Text>
|
||||||
|
<View style={styles.paymentMethodRow}>
|
||||||
|
<TouchableOpacity
|
||||||
|
style={[styles.paymentMethodBtn, paymentMethod === "especes" && styles.paymentMethodBtnActive]}
|
||||||
|
onPress={() => setPaymentMethod("especes")}
|
||||||
|
>
|
||||||
|
<Ionicons name="cash-outline" size={22} color={paymentMethod === "especes" ? CRYPTO_COLOR : colors.textMuted} />
|
||||||
|
<Text style={[styles.paymentMethodBtnText, paymentMethod === "especes" && styles.paymentMethodBtnTextActive]}>
|
||||||
|
Espèces
|
||||||
|
</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
<TouchableOpacity
|
||||||
|
style={[styles.paymentMethodBtn, paymentMethod === "crypto" && styles.paymentMethodBtnActive]}
|
||||||
|
onPress={() => setPaymentMethod("crypto")}
|
||||||
|
>
|
||||||
|
<Ionicons name="logo-bitcoin" size={22} color={paymentMethod === "crypto" ? CRYPTO_COLOR : colors.textMuted} />
|
||||||
|
<Text style={[styles.paymentMethodBtnText, paymentMethod === "crypto" && styles.paymentMethodBtnTextActive]}>
|
||||||
|
Crypto
|
||||||
|
</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
</View>
|
||||||
|
{paymentMethod === "crypto" && (
|
||||||
|
<>
|
||||||
|
<Text style={styles.sectionTitle}>Cryptomonnaie</Text>
|
||||||
|
<View style={styles.currencyGrid}>
|
||||||
|
{cryptoCurrencies.map((c) => (
|
||||||
|
<TouchableOpacity
|
||||||
|
key={c}
|
||||||
|
style={[styles.currencyBtn, payCurrency === c && styles.currencyBtnActive]}
|
||||||
|
onPress={() => setPayCurrency(c)}
|
||||||
|
>
|
||||||
|
<Text style={[styles.currencyBtnText, payCurrency === c && styles.currencyBtnTextActive]}>
|
||||||
|
{c.toUpperCase()}
|
||||||
|
</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
))}
|
||||||
|
</View>
|
||||||
|
<Text style={styles.cryptoHint}>
|
||||||
|
Vous recevrez l'adresse wallet après validation
|
||||||
|
</Text>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user