chore: build
Frontend Client - EAS Build / build (push) Failing after 1h41m31s
Frontend Web - Build & Lint / build (push) Successful in 15m1s

This commit is contained in:
Xor290
2026-08-20 19:36:22 +02:00
parent 5a6861ae04
commit 12cc14eb2b
3 changed files with 43 additions and 13 deletions
+5 -2
View File
@@ -5,6 +5,8 @@ import { useNavigate } from "react-router-dom";
import { isUserAuthenticated, getProductById, getMediaUrl } from "../../api/api"; import { isUserAuthenticated, getProductById, getMediaUrl } from "../../api/api";
import type { Product } from "../../api/api"; import type { Product } from "../../api/api";
import { Trash2, ShoppingCart, AlertTriangle, Leaf, X } from "lucide-react"; import { Trash2, ShoppingCart, AlertTriangle, Leaf, X } from "lucide-react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faGift } from "@fortawesome/free-solid-svg-icons";
import "./Cart.css"; import "./Cart.css";
interface CartItemWithMedia { interface CartItemWithMedia {
@@ -180,8 +182,9 @@ function Cart() {
<p className="cart-row-name"> <p className="cart-row-name">
{item.name_product} {item.name_product}
{item.is_reward && ( {item.is_reward && (
<span style={{ marginLeft: "6px", fontSize: "0.7rem", fontWeight: 700, color: "#f59e0b", background: "rgba(245,158,11,0.12)", borderRadius: "4px", padding: "1px 6px" }}> <span style={{ display: "inline-flex", alignItems: "center", gap: "4px", marginLeft: "6px", fontSize: "0.7rem", fontWeight: 700, color: "#f59e0b", background: "rgba(245,158,11,0.12)", borderRadius: "4px", padding: "1px 6px" }}>
🎁 Récompense <FontAwesomeIcon icon={faGift} />
Récompense
</span> </span>
)} )}
</p> </p>
@@ -210,7 +210,7 @@ function ConsultationHistorique() {
if (res.success) { if (res.success) {
const text = const text =
res.product_added && res.product_names?.length res.product_added && res.product_names?.length
? `🎁 ${res.product_names.join(", ")} ajouté${res.product_names.length > 1 ? "s" : ""} à votre panier ! Commandez au moins un produit pour en profiter.` ? `${res.product_names.join(", ")} ajouté${res.product_names.length > 1 ? "s" : ""} à votre panier ! Commandez au moins un produit pour en profiter.`
: res.description || "Récompense réclamée !"; : res.description || "Récompense réclamée !";
setClaimFeedback({ pool: poolKey, type: "success", text }); setClaimFeedback({ pool: poolKey, type: "success", text });
getMyPointsRewards().then((r) => { getMyPointsRewards().then((r) => {
@@ -505,6 +505,15 @@ function ConsultationHistorique() {
<p <p
className={`reward-feedback reward-feedback-${feedback.type}`} className={`reward-feedback reward-feedback-${feedback.type}`}
> >
{feedback.type ===
"success" && (
<FontAwesomeIcon
icon={faGift}
style={{
marginRight: 6,
}}
/>
)}
{feedback.text} {feedback.text}
</p> </p>
)} )}
@@ -146,7 +146,7 @@ export default function OrderHistoryScreen() {
if (res.success) { if (res.success) {
const text = const text =
res.product_added && res.product_name res.product_added && res.product_name
? `🎁 ${res.product_name} ajouté à votre panier ! Commandez au moins un produit pour en profiter.` ? `${res.product_name} ajouté à votre panier ! Commandez au moins un produit pour en profiter.`
: res.description || "Récompense réclamée !"; : res.description || "Récompense réclamée !";
setClaimFeedback({ pool: poolKey, type: "success", text }); setClaimFeedback({ pool: poolKey, type: "success", text });
getMyPointsRewards().then((r) => { getMyPointsRewards().then((r) => {
@@ -882,16 +882,34 @@ export default function OrderHistoryScreen() {
: `Encore ${remaining} pts pour une récompense`} : `Encore ${remaining} pts pour une récompense`}
</Text> </Text>
{feedback && ( {feedback && (
<Text <View
style={ style={{
feedback.type === flexDirection:
"success" "row",
? styles.feedbackSuccess alignItems:
: styles.feedbackError "center",
} gap: 4,
}}
> >
{feedback.text} {feedback.type ===
</Text> "success" && (
<Ionicons
name="gift-outline"
size={12}
color="#10b981"
/>
)}
<Text
style={
feedback.type ===
"success"
? styles.feedbackSuccess
: styles.feedbackError
}
>
{feedback.text}
</Text>
</View>
)} )}
{pool.rewards_available > 0 && ( {pool.rewards_available > 0 && (
<TouchableOpacity <TouchableOpacity