fixed some sizes
This commit is contained in:
@@ -22,12 +22,12 @@ export default function CartPage() {
|
|||||||
const [paymentType, setPaymentType] = useState<PaymentType | null>(null);
|
const [paymentType, setPaymentType] = useState<PaymentType | null>(null);
|
||||||
const [deliveryType, setDeliveryType] =
|
const [deliveryType, setDeliveryType] =
|
||||||
useState<DeliveryType>("SELECTED_DELIVERY");
|
useState<DeliveryType>("SELECTED_DELIVERY");
|
||||||
const [selectedRegion, setSelectedRegion] = useState<string>("");
|
const [selectedRegion, setSelectedRegion] = useState<string>("ag");
|
||||||
const [selectedProvince, setSelectedProvince] = useState<number | null>(null);
|
const [selectedProvince, setSelectedProvince] = useState<number | null>(4);
|
||||||
const [note, setNote] = useState<string>("");
|
const [note, setNote] = useState<string>("");
|
||||||
const [phone, setPhone] = useState<string>("+993 ");
|
const [phone, setPhone] = useState<string>("+993 ");
|
||||||
const [name, setName] = useState<string>("");
|
const [name, setName] = useState<string>("user");
|
||||||
const [lastName, setLastName] = useState<string>("");
|
const [lastName, setLastName] = useState<string>("user");
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
|
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ export default function CartItemCard({ item, onUpdate }: CartItemCardProps) {
|
|||||||
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3">
|
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3">
|
||||||
{/* Product Image & Info */}
|
{/* Product Image & Info */}
|
||||||
<div className="md:flex gap-4 flex-1">
|
<div className="md:flex gap-4 flex-1">
|
||||||
<div className="relative w-full h-full min-h-[200px] rounded-lg border border-gray-200 overflow-hidden shrink-0 bg-gray-50">
|
<div className="relative w-full aspect-square rounded-lg border border-gray-200 overflow-hidden shrink-0 bg-gray-50">
|
||||||
<Image
|
<Image
|
||||||
src={getImageSrc()}
|
src={getImageSrc()}
|
||||||
alt={item.product.name}
|
alt={item.product.name}
|
||||||
|
|||||||
@@ -133,14 +133,14 @@ export default function OrderSummary({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card className="w-full lg:w-[340px] md:w-[300px] p-6 rounded-lg border border-gray-200 shadow-lg h-fit sticky top-20">
|
<Card className="w-full lg:w-[340px] md:w-[300px] gap-0 p-6 rounded-lg border border-gray-200 shadow-lg h-fit sticky top-20">
|
||||||
{/* Customer Information */}
|
{/* Customer Information */}
|
||||||
<div className="mb-8">
|
<div className="mb-8">
|
||||||
<h3 className="text-xl font-bold mb-5 text-gray-900">
|
<h3 className="text-xl font-bold mb-5 text-gray-900">
|
||||||
{t("customer_information")}
|
{t("customer_information")}
|
||||||
</h3>
|
</h3>
|
||||||
<div className="space-y-5">
|
<div className="space-y-5">
|
||||||
<div>
|
{/* <div>
|
||||||
<Label className="text-sm font-semibold mb-2 block text-gray-700">
|
<Label className="text-sm font-semibold mb-2 block text-gray-700">
|
||||||
{t("name")}
|
{t("name")}
|
||||||
</Label>
|
</Label>
|
||||||
@@ -182,7 +182,7 @@ export default function OrderSummary({
|
|||||||
{t("requiredField")}
|
{t("requiredField")}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div> */}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Label className="text-sm font-semibold mb-2 block text-gray-700">
|
<Label className="text-sm font-semibold mb-2 block text-gray-700">
|
||||||
@@ -209,7 +209,7 @@ export default function OrderSummary({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Region Selection */}
|
{/* Region Selection */}
|
||||||
<div className="mb-8">
|
{/* <div className="mb-8">
|
||||||
<Label className="text-xl font-bold mb-4 block text-gray-900">
|
<Label className="text-xl font-bold mb-4 block text-gray-900">
|
||||||
{t("choose_region")}
|
{t("choose_region")}
|
||||||
</Label>
|
</Label>
|
||||||
@@ -246,10 +246,10 @@ export default function OrderSummary({
|
|||||||
{t("requiredField")}
|
{t("requiredField")}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div> */}
|
||||||
|
|
||||||
{/* Province Selection */}
|
{/* Province Selection */}
|
||||||
{selectedRegion && provincesForSelectedRegion.length > 0 && (
|
{/* selectedRegion && provincesForSelectedRegion.length > 0 && (
|
||||||
<div className="mb-8">
|
<div className="mb-8">
|
||||||
<Label className="text-xl font-bold mb-4 block text-gray-900">
|
<Label className="text-xl font-bold mb-4 block text-gray-900">
|
||||||
{t("choose_address")}
|
{t("choose_address")}
|
||||||
@@ -285,7 +285,7 @@ export default function OrderSummary({
|
|||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
) */}
|
||||||
|
|
||||||
{/* Note */}
|
{/* Note */}
|
||||||
<div className="mb-8">
|
<div className="mb-8">
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ export default function ProductCard({
|
|||||||
// style={{ height, maxWidth: width }}
|
// style={{ height, maxWidth: width }}
|
||||||
>
|
>
|
||||||
{/* Image Section */}
|
{/* Image Section */}
|
||||||
<div className="relative w-full h-full bg-gradient-to-br from-gray-50 to-gray-100 overflow-hidden">
|
<div className="relative w-full aspect-square bg-gradient-to-br from-gray-50 to-gray-100 overflow-hidden">
|
||||||
<Carousel
|
<Carousel
|
||||||
opts={{ align: "start", loop: true, watchDrag: true }}
|
opts={{ align: "start", loop: true, watchDrag: true }}
|
||||||
setApi={setApi}
|
setApi={setApi}
|
||||||
@@ -281,14 +281,14 @@ export default function ProductCard({
|
|||||||
onPointerUp={() => setIsInteracting(false)}
|
onPointerUp={() => setIsInteracting(false)}
|
||||||
onPointerCancel={() => setIsInteracting(false)}
|
onPointerCancel={() => setIsInteracting(false)}
|
||||||
>
|
>
|
||||||
<CarouselContent className="h-auto ml-0">
|
<CarouselContent className="h-full ml-0">
|
||||||
{images.map((image, idx) => (
|
{images.map((image, idx) => (
|
||||||
<CarouselItem key={idx} className="h-auto pl-0">
|
<CarouselItem key={idx} className="h-full pl-0">
|
||||||
<div className="h-full flex items-center justify-center p-2">
|
<div className="w-full h-full flex items-center justify-center p-1 md:p-2">
|
||||||
<img
|
<img
|
||||||
src={image}
|
src={image}
|
||||||
alt={`${name} - ${idx + 1}`}
|
alt={`${name} - ${idx + 1}`}
|
||||||
className={`max-w-full max-h-full object-cover transition-transform duration-500 ${
|
className={`max-w-full max-h-full object-contain rounded-t-sm transition-transform duration-500 ${
|
||||||
isHovered ? "scale-105" : "scale-100"
|
isHovered ? "scale-105" : "scale-100"
|
||||||
}`}
|
}`}
|
||||||
draggable="false"
|
draggable="false"
|
||||||
@@ -372,17 +372,17 @@ export default function ProductCard({
|
|||||||
{/* Content Section */}
|
{/* Content Section */}
|
||||||
<CardContent className="p-3 space-y-3">
|
<CardContent className="p-3 space-y-3">
|
||||||
{/* Product Name */}
|
{/* Product Name */}
|
||||||
<h3 className="text-gray-900 text-base font-semibold leading-tight line-clamp-2">
|
<h3 className="text-gray-900 text-base font-semibold leading-tight line-clamp-2 min-h-[40px]">
|
||||||
{name}
|
{name}
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
{/* Price */}
|
{/* Price */}
|
||||||
<div className="flex items-baseline gap-1">
|
<div className="flex-col flex md:flex-row items-baseline gap-1">
|
||||||
<p
|
<p
|
||||||
className="text-xl font-bold tracking-tight"
|
className="text-xl font-bold tracking-tight"
|
||||||
style={{ color: price_color }}
|
style={{ color: price_color }}
|
||||||
>
|
>
|
||||||
{struct_price_text}
|
{struct_price_text.replace(/\.00\b/, "")}
|
||||||
</p>
|
</p>
|
||||||
{oldPrice && (
|
{oldPrice && (
|
||||||
<span className="text-sm text-gray-400 line-through ">
|
<span className="text-sm text-gray-400 line-through ">
|
||||||
@@ -426,9 +426,9 @@ export default function ProductCard({
|
|||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<ShoppingCart className="h-5 w-5" />
|
<ShoppingCart className="h-5 w-5" />
|
||||||
<span className="hidden md:flex">
|
{/* <span className="hidden md:flex">
|
||||||
{t("add_to_cart")}
|
{t("add_to_cart")}
|
||||||
</span>
|
</span> */}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user