feat: add product detail page with components and infinite scroll

- Add SingleProduct component for product detail page
- Implement product data hooks and services
- Add infinite scroll functionality for products list
- Update ProductCard component with new features
- Add product types and specifications
- Fix TypeScript errors in product page
- Update profile page layout
- Add global CSS improvements
This commit is contained in:
hamid zarghami
2025-09-07 09:17:58 +03:30
parent 5ec2b621bc
commit 2995b11900
17 changed files with 667 additions and 343 deletions
+9
View File
@@ -0,0 +1,9 @@
import axios from "@/config/axios";
import { ProductDetailResponse } from "@/types/product.types";
export const getProduct = async (
id: string
): Promise<ProductDetailResponse> => {
const { data } = await axios.get(`/product/${id}`);
return data;
};