add dashboard, feedback, faq

This commit is contained in:
Billy Marcello
2025-11-22 19:21:04 +07:00
parent fcdbf7d664
commit 96ee371975
16 changed files with 1626 additions and 64 deletions
+6 -2
View File
@@ -23,8 +23,10 @@ const DetailsProduct = () => {
fetch(`${import.meta.env.VITE_API_BASE_URL}/hasil-research-api/get/${id}`)
.then((res) => res.json())
.then((data) => {
if (data && data.data && data.data.length > 0) {
setProduct(data.data[0]);
if (data && data.data) {
setProduct(data.data);
} else {
setProduct(null);
}
setLoading(false);
})
@@ -43,6 +45,8 @@ const DetailsProduct = () => {
<div className="text-center mt-10 text-red-500">Data tidak ditemukan</div>
);
}
console.log(`${import.meta.env.VITE_API_BASE_URL}${product.image_path}`);
return (
<div className="body-details-of-product bg-[#F8F9FA] min-h-screen">