From 082c62fe95101f74bc9f3254c3a7fe0cc31eae55 Mon Sep 17 00:00:00 2001 From: saanvi548 Date: Sun, 16 Nov 2025 17:11:10 +0530 Subject: [PATCH 1/6] adding the wholesale site --- app/wholesale/add-product/page.jsx | 80 +++++++++++++ app/wholesale/layout.jsx | 17 +++ app/wholesale/manage-product/page.jsx | 70 ++++++++++++ app/wholesale/orders/page.jsx | 159 ++++++++++++++++++++++++++ app/wholesale/page.jsx | 93 +++++++++++++++ 5 files changed, 419 insertions(+) create mode 100644 app/wholesale/add-product/page.jsx create mode 100644 app/wholesale/layout.jsx create mode 100644 app/wholesale/manage-product/page.jsx create mode 100644 app/wholesale/orders/page.jsx create mode 100644 app/wholesale/page.jsx diff --git a/app/wholesale/add-product/page.jsx b/app/wholesale/add-product/page.jsx new file mode 100644 index 00000000..2707490d --- /dev/null +++ b/app/wholesale/add-product/page.jsx @@ -0,0 +1,80 @@ +'use client' +import { assets } from "@/assets/assets" +import Image from "next/image" +import { useState } from "react" +import { toast } from "react-hot-toast" + +export default function StoreAddProduct() { + + const categories = ['Electronics', 'Clothing', 'Home & Kitchen', 'Beauty & Health', 'Toys & Games', 'Sports & Outdoors', 'Books & Media', 'Food & Drink', 'Hobbies & Crafts', 'Others'] + + const [images, setImages] = useState({ 1: null, 2: null, 3: null, 4: null }) + const [productInfo, setProductInfo] = useState({ + name: "", + description: "", + mrp: 0, + price: 0, + category: "", + }) + const [loading, setLoading] = useState(false) + + + const onChangeHandler = (e) => { + setProductInfo({ ...productInfo, [e.target.name]: e.target.value }) + } + + const onSubmitHandler = async (e) => { + e.preventDefault() + // Logic to add a product + + } + + + return ( +
toast.promise(onSubmitHandler(e), { loading: "Adding Product..." })} className="text-slate-500 mb-28"> +

Add New Products

+

Product Images

+ +
+ {Object.keys(images).map((key) => ( + + ))} +
+ + + +