Comments, appointments adjustments, fixed some issues
This commit is contained in:
@@ -7,6 +7,7 @@ import ProductProfile from "@/components/ProductProfile";
|
||||
|
||||
const API_BASE = "";
|
||||
|
||||
//Product detail page, fetches a single product by ID and passes it to ProductProfile
|
||||
export default function ProductDetailPage() {
|
||||
const { id } = useParams();
|
||||
const [product, setProduct] = useState(null);
|
||||
|
||||
@@ -4,6 +4,8 @@ import { useState, useEffect } from "react";
|
||||
import ProductCard from "@/components/ProductCard";
|
||||
import { fetchAllPages } from "@/lib/fetchAllPages";
|
||||
|
||||
//Products page
|
||||
//Searchable grid of all store products with pagination
|
||||
const API_BASE = "";
|
||||
|
||||
export default function ProductsPage() {
|
||||
@@ -34,6 +36,7 @@ export default function ProductsPage() {
|
||||
const totalPages = Math.ceil(products.length / ITEMS_PER_PAGE);
|
||||
const displayedProducts = products.slice(currentPage * ITEMS_PER_PAGE, (currentPage + 1) * ITEMS_PER_PAGE);
|
||||
|
||||
//Submits the search form
|
||||
function handleSearch(e) {
|
||||
e.preventDefault();
|
||||
setLoading(true);
|
||||
|
||||
Reference in New Issue
Block a user