Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 33f451177f | |||
| bf992f4ad6 | |||
| 793b80c8dd | |||
| c33fe11a0b | |||
| 4dafe71207 | |||
| bbd5b6da9f | |||
| 470c93e42f | |||
| b42430ab58 | |||
| 138375d171 | |||
| f3496f3f13 | |||
| 64aa7c513f |
86
src/app/cart/page.tsx
Normal file
86
src/app/cart/page.tsx
Normal file
@@ -0,0 +1,86 @@
|
||||
"use client";
|
||||
|
||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||
import ReactLenis from "lenis/react";
|
||||
import ProductCart from '@/components/ecommerce/cart/ProductCart';
|
||||
import NavbarStyleFullscreen from '@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen';
|
||||
import React, { useState } from 'react';
|
||||
|
||||
export default function CartPage() {
|
||||
const [cartItems, setCartItems] = useState([
|
||||
{
|
||||
id: "prod-1", name: "Saffron Elixir Serum", price: "$120.00", quantity: 1,
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/arrangement-with-make-up-container_23-2149030340.jpg?_wi=2", imageAlt: "Saffron Elixir Serum bottle"},
|
||||
{
|
||||
id: "prod-2", name: "Rose Hydrating Mist", price: "$65.00", quantity: 2,
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/ecofriendly-beauty-product_23-2150669138.jpg?_wi=2", imageAlt: "Rose Hydrating Mist spray bottle"},
|
||||
]);
|
||||
|
||||
const handleQuantityChange = (id: string, newQuantity: number) => {
|
||||
setCartItems((prevItems) =>
|
||||
prevItems.map((item) => (item.id === id ? { ...item, quantity: newQuantity } : item))
|
||||
);
|
||||
};
|
||||
|
||||
const handleRemoveItem = (id: string) => {
|
||||
setCartItems((prevItems) => prevItems.filter((item) => item.id !== id));
|
||||
};
|
||||
|
||||
const calculateTotal = () => {
|
||||
return cartItems
|
||||
.reduce((sum, item) => sum + parseFloat(item.price.replace('$', '')) * item.quantity, 0)
|
||||
.toFixed(2);
|
||||
};
|
||||
|
||||
const navItems = [
|
||||
{ name: "Home", id: "/" },
|
||||
{ name: "Skincare", id: "#skincare" },
|
||||
{ name: "IranPour Men", id: "#iranpour" },
|
||||
{ name: "Wholesale", id: "#wholesale" },
|
||||
{ name: "Contact", id: "#wholesale" },
|
||||
{ name: "Cart", id: "/cart" }
|
||||
];
|
||||
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="directional-hover"
|
||||
defaultTextAnimation="reveal-blur"
|
||||
borderRadius="rounded"
|
||||
contentWidth="smallMedium"
|
||||
sizing="large"
|
||||
background="circleGradient"
|
||||
cardStyle="subtle-shadow"
|
||||
primaryButtonStyle="radial-glow"
|
||||
secondaryButtonStyle="glass"
|
||||
headingFontWeight="semibold"
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="nav" data-section="nav">
|
||||
<NavbarStyleFullscreen
|
||||
navItems={navItems}
|
||||
logoSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=udbkoo"
|
||||
logoAlt="IranDokht logo"
|
||||
brandName="IranDokht"
|
||||
bottomLeftText="Global Luxury Community"
|
||||
bottomRightText="contact@irandokht.com"
|
||||
/>
|
||||
</div>
|
||||
<div id="cart-content" data-section="cart-content" className="min-h-screen pt-24 pb-12 flex justify-center items-center">
|
||||
<ProductCart
|
||||
isOpen={true} // Always open on this dedicated cart page
|
||||
onClose={() => {}} // No specific close action for a dedicated page
|
||||
items={cartItems}
|
||||
onQuantityChange={handleQuantityChange}
|
||||
onRemove={handleRemoveItem}
|
||||
total={`$${calculateTotal()}`}
|
||||
buttons={[
|
||||
{ text: "Continue Shopping", href: "/" },
|
||||
{ text: "Proceed to Checkout", href: "/checkout" }
|
||||
]}
|
||||
title="Your Shopping Cart"
|
||||
/>
|
||||
</div>
|
||||
</ReactLenis>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import ReactLenis from "lenis/react";
|
||||
import ContactCenter from '@/components/sections/contact/ContactCenter';
|
||||
import FaqBase from '@/components/sections/faq/FaqBase';
|
||||
import FeatureCardTwentyFive from '@/components/sections/feature/FeatureCardTwentyFive';
|
||||
import FooterLogoReveal from '@/components/sections/footer/FooterLogoReveal';
|
||||
import FooterLogoEmphasis from '@/components/sections/footer/FooterLogoEmphasis';
|
||||
import HeroOverlay from '@/components/sections/hero/HeroOverlay';
|
||||
import NavbarStyleFullscreen from '@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen';
|
||||
import ProductCardFour from '@/components/sections/product/ProductCardFour';
|
||||
@@ -40,7 +40,7 @@ export default function LandingPage() {
|
||||
{
|
||||
name: "Wholesale", id: "#wholesale"},
|
||||
{
|
||||
name: "Contact", id: "#contact"},
|
||||
name: "Contact", id: "#wholesale"},
|
||||
]}
|
||||
logoSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=udbkoo"
|
||||
logoAlt="IranDokht logo"
|
||||
@@ -132,9 +132,9 @@ export default function LandingPage() {
|
||||
carouselMode="buttons"
|
||||
products={[
|
||||
{
|
||||
id: "prod-1", name: "Saffron Elixir Serum", price: "$120.00", variant: "30ml", imageSrc: "http://img.b2bpic.net/free-photo/arrangement-with-make-up-container_23-2149030340.jpg", imageAlt: "Saffron Elixir Serum bottle"},
|
||||
id: "prod-1", name: "Saffron Elixir Serum", price: "$120.00", variant: "30ml", imageSrc: "http://img.b2bpic.net/free-photo/arrangement-with-make-up-container_23-2149030340.jpg?_wi=1", imageAlt: "Saffron Elixir Serum bottle"},
|
||||
{
|
||||
id: "prod-2", name: "Rose Hydrating Mist", price: "$65.00", variant: "100ml", imageSrc: "http://img.b2bpic.net/free-photo/ecofriendly-beauty-product_23-2150669138.jpg", imageAlt: "Rose Hydrating Mist spray bottle"},
|
||||
id: "prod-2", name: "Rose Hydrating Mist", price: "$65.00", variant: "100ml", imageSrc: "http://img.b2bpic.net/free-photo/ecofriendly-beauty-product_23-2150669138.jpg?_wi=1", imageAlt: "Rose Hydrating Mist spray bottle"},
|
||||
{
|
||||
id: "prod-3", name: "Persian Silk Face Cream", price: "$150.00", variant: "50g", imageSrc: "http://img.b2bpic.net/free-photo/cosmetic-tube-product-with-gift-box-balloons-black-background_187299-46830.jpg", imageAlt: "Persian Silk Face Cream jar"},
|
||||
{
|
||||
@@ -253,14 +253,51 @@ export default function LandingPage() {
|
||||
</div>
|
||||
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterLogoReveal
|
||||
<FooterLogoEmphasis
|
||||
logoSrc="http://img.b2bpic.net/free-vector/illustration-business-shop-logo-stamp-banner_53876-3734.jpg"
|
||||
logoAlt="IranDokht logo"
|
||||
logoText="IranDokht"
|
||||
leftLink={{
|
||||
text: "Privacy Policy", href: "#"}}
|
||||
rightLink={{
|
||||
text: "Terms of Service", href: "#"}}
|
||||
columns={[
|
||||
{
|
||||
items: [
|
||||
{
|
||||
label: "FAQ", href: "#faq"},
|
||||
{
|
||||
label: "Wholesale", href: "#wholesale"},
|
||||
{
|
||||
label: "Contact Us", href: "#wholesale"},
|
||||
]},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
label: "Home", href: "#home"},
|
||||
{
|
||||
label: "Skincare", href: "#skincare"},
|
||||
{
|
||||
label: "IranPour Men", href: "#iranpour"},
|
||||
{
|
||||
label: "Testimonials", href: "#testimonials"},
|
||||
{
|
||||
label: "Social Proof", href: "#social-proof"},
|
||||
]},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
label: "WhatsApp", href: "#"},
|
||||
{
|
||||
label: "Instagram", href: "#"},
|
||||
{
|
||||
label: "Facebook", href: "#"},
|
||||
]},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
label: "Stay Connected", href: "#"},
|
||||
{
|
||||
label: "Subscribe for updates", href: "#"},
|
||||
]}
|
||||
]}
|
||||
className="bg-[#2F4F4F] text-[var(--background)]"
|
||||
/>
|
||||
</div>
|
||||
</ReactLenis>
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
|
||||
--background: #F5F5DC;
|
||||
--card: #ffffff;
|
||||
--foreground: #2F241F;
|
||||
--foreground: #3A5F40;
|
||||
--primary-cta: #B8001F;
|
||||
--primary-cta-text: #ffffff;
|
||||
--secondary-cta: #F5F5DC;
|
||||
--secondary-cta-text: #2F241F;
|
||||
--secondary-cta-text: #3A5F40;
|
||||
--accent: #C19A6B;
|
||||
--background-accent: #D4B996;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user