detail page connected to backend , modal form for one product connected to backend

This commit is contained in:
nabijonovdavronbek619@gmail.com
2026-02-07 14:36:11 +05:00
parent 74f1d7a9fd
commit 6a89bc1acc
11 changed files with 493 additions and 274 deletions

View File

@@ -1,4 +1,3 @@
import { useLocale } from "next-intl";
import Image from "next/image";
import Link from "next/link";
@@ -7,17 +6,19 @@ interface ProductCardProps {
title: string;
image: string;
slug: string;
getProduct: () => void;
}
export default function ProductCard({
title,
image,
slug,
getProduct,
}: ProductCardProps) {
const locale = useLocale();
return (
<Link href={`/${locale}/products/${slug}`}>
<Link href={`/${locale}/products/${slug}`} onClick={getProduct}>
<article className="group transition-all duration-300 hover:cursor-pointer max-sm:max-w-100 max-sm:mx-auto max-sm:w-full">
{/* Image Container */}
<div className="relative rounded-2xl h-45 sm:h-55 md:h-65 lg:w-[95%] w-[90%] mx-auto overflow-hidden">