chore: build
This commit is contained in:
@@ -5,6 +5,8 @@ import { useNavigate } from "react-router-dom";
|
||||
import { isUserAuthenticated, getProductById, getMediaUrl } from "../../api/api";
|
||||
import type { Product } from "../../api/api";
|
||||
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";
|
||||
|
||||
interface CartItemWithMedia {
|
||||
@@ -180,8 +182,9 @@ function Cart() {
|
||||
<p className="cart-row-name">
|
||||
{item.name_product}
|
||||
{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" }}>
|
||||
🎁 Récompense
|
||||
<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" }}>
|
||||
<FontAwesomeIcon icon={faGift} />
|
||||
Récompense
|
||||
</span>
|
||||
)}
|
||||
</p>
|
||||
|
||||
@@ -210,7 +210,7 @@ function ConsultationHistorique() {
|
||||
if (res.success) {
|
||||
const text =
|
||||
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 !";
|
||||
setClaimFeedback({ pool: poolKey, type: "success", text });
|
||||
getMyPointsRewards().then((r) => {
|
||||
@@ -505,6 +505,15 @@ function ConsultationHistorique() {
|
||||
<p
|
||||
className={`reward-feedback reward-feedback-${feedback.type}`}
|
||||
>
|
||||
{feedback.type ===
|
||||
"success" && (
|
||||
<FontAwesomeIcon
|
||||
icon={faGift}
|
||||
style={{
|
||||
marginRight: 6,
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{feedback.text}
|
||||
</p>
|
||||
)}
|
||||
|
||||
@@ -146,7 +146,7 @@ export default function OrderHistoryScreen() {
|
||||
if (res.success) {
|
||||
const text =
|
||||
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 !";
|
||||
setClaimFeedback({ pool: poolKey, type: "success", text });
|
||||
getMyPointsRewards().then((r) => {
|
||||
@@ -882,16 +882,34 @@ export default function OrderHistoryScreen() {
|
||||
: `Encore ${remaining} pts pour une récompense`}
|
||||
</Text>
|
||||
{feedback && (
|
||||
<Text
|
||||
style={
|
||||
feedback.type ===
|
||||
"success"
|
||||
? styles.feedbackSuccess
|
||||
: styles.feedbackError
|
||||
}
|
||||
<View
|
||||
style={{
|
||||
flexDirection:
|
||||
"row",
|
||||
alignItems:
|
||||
"center",
|
||||
gap: 4,
|
||||
}}
|
||||
>
|
||||
{feedback.text}
|
||||
</Text>
|
||||
{feedback.type ===
|
||||
"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 && (
|
||||
<TouchableOpacity
|
||||
|
||||
Reference in New Issue
Block a user