chore: fix comming soon
This commit is contained in:
@@ -94,9 +94,15 @@ export default function ProductsScreen() {
|
||||
}, [selectedCategory]);
|
||||
|
||||
useEffect(() => {
|
||||
const catObj = categories.find((c) => c.name === selectedCategory);
|
||||
if (catObj?.is_coming_soon) {
|
||||
setLoading(false);
|
||||
setProducts([]);
|
||||
return;
|
||||
}
|
||||
setLoading(true);
|
||||
fetchProducts();
|
||||
}, [fetchProducts]);
|
||||
}, [selectedCategory, categories, fetchProducts]);
|
||||
|
||||
useEffect(() => {
|
||||
if (carouselRef.current && products.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user