chore: add comming soon category

This commit is contained in:
2026-03-07 17:59:34 +01:00
parent 0eb775f3ef
commit ab7d8929a8
4 changed files with 81 additions and 6 deletions
+1
View File
@@ -117,6 +117,7 @@ export interface Category {
id: number;
name: string;
color: string;
is_coming_soon: boolean;
created_at: string;
}
+27 -1
View File
@@ -164,6 +164,13 @@ export default function ProductsScreen() {
paddingBottom: 96,
pointerEvents: "none",
},
comingSoonContent: {
flex: 1,
justifyContent: "center",
alignItems: "center",
padding: spacing.xl,
gap: spacing.m,
},
comingSoonText: {
fontSize: 36,
color: "#8E8FE8",
@@ -174,10 +181,18 @@ export default function ProductsScreen() {
textShadowOffset: { width: 0, height: 0 },
textShadowRadius: 18,
},
comingSoonDesc: {
fontSize: fontSize.md,
color: "rgba(142, 143, 232, 0.7)",
textAlign: "center",
},
}),
[colors],
);
const selectedCategoryObj = categories.find((c) => c.name === selectedCategory);
const isSelectedComingSoon = selectedCategoryObj?.is_coming_soon ?? false;
if (loading && !refreshing) {
return <LoadingSpinner message="Chargement des produits..." />;
}
@@ -215,7 +230,18 @@ export default function ProductsScreen() {
{selectedCategory === "tous" ? "Tous les produits" : selectedCategory}
</Text>
</View>
{error ? (
{isSelectedComingSoon ? (
<View style={styles.comingSoonContent}>
<Animated.Text
style={[styles.comingSoonText, { transform: [{ scale: scaleAnim }] }]}
>
Prochainement
</Animated.Text>
<Text style={styles.comingSoonDesc}>
Les produits de cette catégorie arrivent bientôt !
</Text>
</View>
) : error ? (
<View style={styles.center}>
<Text style={styles.errorText}>{error}</Text>
</View>