Homepg & ProductDet.. now updated

This commit is contained in:
Mann Patel
2025-03-25 14:47:54 -06:00
parent e7a6e1dd8b
commit f52693dfc2
4 changed files with 156 additions and 68 deletions

View File

@@ -21,14 +21,14 @@ const Home = () => {
setListings(
data.data.map((product) => ({
id: product.ProductID,
title: product.Name,
title: product.ProductName, // Use the alias from SQL
price: product.Price,
category: product.CategoryID,
image: product.URL,
category: product.Category, // Ensure this gets the category name
image: product.ProductImage, // Use the alias for image URL
condition: "New", // Modify based on actual data
seller: product.UserID, // Modify if seller info is available
datePosted: "Just now",
isFavorite: false,
seller: product.SellerName, // Fetch seller name properly
datePosted: product.DateUploaded, // Use the actual date
isFavorite: false, // Default state
})),
);
} else {