chore: build
Frontend Client - EAS Build / build (push) Failing after 2h9m57s
Frontend Admin - EAS Build / build (push) Failing after 2h24m0s

This commit is contained in:
Nuxgrid
2026-07-08 22:24:39 +02:00
parent 12a7facc45
commit f531ddcda8
3 changed files with 20 additions and 8 deletions
+13 -8
View File
@@ -50,16 +50,19 @@ export default function ProductsScreen() {
const carouselRef = useRef<FlatList>(null);
const scaleAnim = useRef(new Animated.Value(1)).current;
useEffect(() => {
getCategories().then((cats) => {
const sorted = [...cats].sort((a, b) => {
if (a.is_coming_soon === b.is_coming_soon) return 0;
return a.is_coming_soon ? 1 : -1;
});
setCategories(sorted);
const loadCategories = useCallback(async () => {
const cats = await getCategories();
const sorted = [...cats].sort((a, b) => {
if (a.is_coming_soon === b.is_coming_soon) return 0;
return a.is_coming_soon ? 1 : -1;
});
setCategories(sorted);
}, []);
useEffect(() => {
loadCategories();
}, [loadCategories]);
useEffect(() => {
const pulse = Animated.loop(
Animated.sequence([
@@ -118,7 +121,9 @@ export default function ProductsScreen() {
const onRefresh = () => {
setRefreshing(true);
fetchProducts();
// Le rechargement des produits est déclenché par l'effet ci-dessus
// dès que `categories` change (nouvelle référence à chaque appel).
loadCategories();
};
const styles = useMemo(