-
+
+ {allProducts && allProducts.length > 0 ? (
+
+ ) : (
+
+ )}
);
}
diff --git a/lib/allProducts.ts b/lib/allProducts.ts
index efaa6f0..97b8a75 100644
--- a/lib/allProducts.ts
+++ b/lib/allProducts.ts
@@ -2,9 +2,12 @@ import axios from "axios";
export const allProduct = async () => {
try{
- const res = await axios.get('')
+ const res = await axios.get('https://api.serenmebel.uz/api/products/');
+ console.log("all products res: ",res);
+
+ return res
}catch(err){
console.log("all product error: ",err);
-
+ return []
}
};
diff --git a/lib/translations.ts b/lib/translations.ts
index f5f16a0..2eb8962 100644
--- a/lib/translations.ts
+++ b/lib/translations.ts
@@ -92,6 +92,10 @@ export const translations = {
},
more: "Ko'proq ko'rish",
details: "Batafsil",
+ empty_data:{
+ description:"Mahsulot topilmadi!!!",
+ back:"Asosiy sahifaga qaytish"
+ }
},
ru: {