diff --git a/public/icons/bale.svg b/public/icons/bale.svg
new file mode 100644
index 0000000..5f9a22f
--- /dev/null
+++ b/public/icons/bale.svg
@@ -0,0 +1,3 @@
+
diff --git a/public/icons/eeta.svg b/public/icons/eeta.svg
new file mode 100644
index 0000000..54905c9
--- /dev/null
+++ b/public/icons/eeta.svg
@@ -0,0 +1,5 @@
+
diff --git a/public/icons/instagram.svg b/public/icons/instagram.svg
new file mode 100644
index 0000000..09d6792
--- /dev/null
+++ b/public/icons/instagram.svg
@@ -0,0 +1,5 @@
+
diff --git a/public/icons/telegram.svg b/public/icons/telegram.svg
new file mode 100644
index 0000000..db3feae
--- /dev/null
+++ b/public/icons/telegram.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/icons/whatsapp.svg b/public/icons/whatsapp.svg
new file mode 100644
index 0000000..52bacc5
--- /dev/null
+++ b/public/icons/whatsapp.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/app/about/page.tsx b/src/app/about/page.tsx
new file mode 100644
index 0000000..595d67c
--- /dev/null
+++ b/src/app/about/page.tsx
@@ -0,0 +1,88 @@
+import Link from "next/link";
+import { getBusinessInfo, safe } from "@/lib/api";
+import { ShieldIcon, TagIcon, TruckIcon } from "@/components/icons";
+
+const FALLBACK_ABOUT =
+ "فروشگاه اینترنتی کودکانه، تولیدکننده و عرضهکننده پوشاک بچگانه با جدیدترین طرحها برای نوزادان، دختران و پسران است. تمام محصولات با پارچههای نرم و مناسب پوست حساس کودکان تولید میشوند و پیش از انتشار در سایت، از نظر کیفیت دوخت و اصالت بررسی میشوند تا خیالتان برای انتخاب لباس فرزندتان راحت باشد.";
+
+const points = [
+ {
+ icon: ShieldIcon,
+ title: "ضمانت اصالت کالا",
+ desc: "تمامی محصولات پیش از ارسال از نظر کیفیت و اصالت بررسی میشوند.",
+ },
+ {
+ icon: TruckIcon,
+ title: "ارسال سریع و رایگان",
+ desc: "ارسال به سراسر کشور با پیک و پست پیشتاز، رایگان برای خریدهای بالای سقف تعیینشده.",
+ },
+ {
+ icon: TagIcon,
+ title: "قیمت مناسب و عمده",
+ desc: "خرید مستقیم از تولیدی با قیمت رقابتی برای مشتریان خرد و عمده.",
+ },
+];
+
+export const metadata = {
+ title: "درباره ما | کودکانه",
+};
+
+export default async function AboutPage() {
+ const info = await safe(getBusinessInfo(), null);
+ const about = info?.about?.trim() || FALLBACK_ABOUT;
+ const vision = info?.vision?.trim();
+
+ return (
+
+
+
+

+
+
+
+
+ About Us
+
+
درباره ما
+
+
+
{about}
+
+ {vision && (
+ <>
+
چشمانداز ما
+
+ {vision}
+
+ >
+ )}
+
+
+ {points.map((p) => (
+
+ ))}
+
+
+
+ تماس با ما
+
+
+
+
+ );
+}
diff --git a/src/app/contact/page.tsx b/src/app/contact/page.tsx
new file mode 100644
index 0000000..e317811
--- /dev/null
+++ b/src/app/contact/page.tsx
@@ -0,0 +1,92 @@
+import { getBusinessInfo, safe } from "@/lib/api";
+import { siteInfo } from "@/data/site";
+import { socialLinks } from "@/components/socialLinks";
+import ContactForm from "@/components/ContactForm";
+import { MailIcon, PhoneIcon, PinIcon } from "@/components/icons";
+
+export const metadata = {
+ title: "تماس با ما | کودکانه",
+};
+
+// business-info's emails/phoneNumbers/addresses shape isn't documented —
+// read either a plain string or a {value|number|email|address|...} object.
+function toText(item: unknown): string {
+ if (typeof item === "string") return item;
+ if (item && typeof item === "object") {
+ const obj = item as Record;
+ const val = obj.value ?? obj.number ?? obj.email ?? obj.address ?? obj.text ?? obj.label;
+ if (typeof val === "string") return val;
+ }
+ return "";
+}
+
+export default async function ContactPage() {
+ const info = await safe(getBusinessInfo(), null);
+
+ const phone = info?.phoneNumbers.map(toText).find(Boolean) || siteInfo.phone;
+ const email = info?.emails.map(toText).find(Boolean) || siteInfo.email;
+ const address = info?.addresses.map(toText).find(Boolean) || siteInfo.address;
+
+ return (
+
+
+
+ Contact Us
+
+
تماس با ما
+
+
+
+
+
+
+
+ -
+
+
+
+
+ {phone}
+
+
+ -
+
+
+
+
+ {email}
+
+
+ -
+
+
+
+ {address}
+
+
+
+
+
+
ما را دنبال کنید
+
+ {socialLinks.map(({ icon: Icon, label, href }) => (
+
+
+
+ ))}
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/src/components/ContactForm.tsx b/src/components/ContactForm.tsx
new file mode 100644
index 0000000..e414ee4
--- /dev/null
+++ b/src/components/ContactForm.tsx
@@ -0,0 +1,111 @@
+"use client";
+
+import { useState, type FormEvent } from "react";
+import { submitContactForm } from "@/lib/api";
+import { CheckIcon } from "./icons";
+
+type Status = "idle" | "loading" | "success" | "error";
+
+const inputClass =
+ "w-full rounded-lg border border-line bg-surface px-4 h-11 text-sm outline-none focus:border-brand transition-colors";
+
+export default function ContactForm() {
+ const [status, setStatus] = useState("idle");
+
+ async function handleSubmit(e: FormEvent) {
+ e.preventDefault();
+ const form = e.currentTarget;
+ const data = new FormData(form);
+
+ const name = String(data.get("name") || "").trim();
+ const title = String(data.get("title") || "").trim();
+ const text = String(data.get("text") || "").trim();
+ const email = String(data.get("email") || "").trim();
+ const cellNumber = String(data.get("cellNumber") || "").trim();
+
+ if (!name || !title || !text) return;
+
+ setStatus("loading");
+ try {
+ await submitContactForm({
+ name,
+ title,
+ text,
+ email: email || undefined,
+ cellNumber: cellNumber || undefined,
+ });
+ setStatus("success");
+ form.reset();
+ } catch {
+ setStatus("error");
+ }
+ }
+
+ if (status === "success") {
+ return (
+
+
+
+
+
پیام شما با موفقیت ارسال شد.
+
بهزودی با شما تماس میگیریم.
+
+ );
+ }
+
+ return (
+
+ );
+}
diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx
index 97852db..5c7a38e 100644
--- a/src/components/Footer.tsx
+++ b/src/components/Footer.tsx
@@ -3,14 +3,8 @@ import Logo from "./Logo";
import { headerNavLinks, siteInfo } from "@/data/site";
import { categoryHref } from "@/lib/slug";
import type { CategoryNode } from "@/lib/types";
-import {
- InstagramIcon,
- MailIcon,
- PhoneIcon,
- PinIcon,
- TelegramIcon,
- WhatsappIcon,
-} from "./icons";
+import { socialLinks } from "./socialLinks";
+import { MailIcon, PhoneIcon, PinIcon } from "./icons";
export default function Footer({ categoryColumns }: { categoryColumns: CategoryNode[] }) {
const categoryItems = categoryColumns.flatMap((col) => col.children).slice(0, 6);
@@ -25,27 +19,16 @@ export default function Footer({ categoryColumns }: { categoryColumns: CategoryN
دختران و پسران با ارسال به سراسر کشور.
-
-
-
-
-
-
-
-
-
+ {socialLinks.map(({ icon: Icon, label, href }) => (
+
+
+
+ ))}
@@ -54,9 +37,15 @@ export default function Footer({ categoryColumns }: { categoryColumns: CategoryN
diff --git a/src/components/Header.tsx b/src/components/Header.tsx
index 6a35fd2..51b13da 100644
--- a/src/components/Header.tsx
+++ b/src/components/Header.tsx
@@ -4,26 +4,13 @@ import { useState } from "react";
import Link from "next/link";
import Logo from "./Logo";
import SearchBox from "./SearchBox";
-import {
- BagIcon,
- ChevronDownIcon,
- CloseIcon,
- InstagramIcon,
- MenuIcon,
- TelegramIcon,
- WhatsappIcon,
-} from "./icons";
+import { BagIcon, ChevronDownIcon, CloseIcon, MenuIcon } from "./icons";
+import { socialLinks } from "./socialLinks";
import { headerNavLinks } from "@/data/site";
import { CUSTOMER_PORTAL_URL } from "@/lib/config";
import { categoryHref } from "@/lib/slug";
import type { CategoryNode } from "@/lib/types";
-const socialLinks = [
- { icon: InstagramIcon, label: "اینستاگرام" },
- { icon: TelegramIcon, label: "تلگرام" },
- { icon: WhatsappIcon, label: "واتساپ" },
-];
-
export default function Header({ categoryColumns }: { categoryColumns: CategoryNode[] }) {
const [productsOpen, setProductsOpen] = useState(false);
const [mobileOpen, setMobileOpen] = useState(false);
@@ -115,24 +102,34 @@ export default function Header({ categoryColumns }: { categoryColumns: CategoryN
)}
- {headerNavLinks.map((link) => (
-
- {link.title}
-
- ))}
+ {headerNavLinks.map((link) =>
+ link.href.startsWith("#") ? (
+
+ {link.title}
+
+ ) : (
+
+ {link.title}
+
+ )
+ )}
- {socialLinks.map(({ icon: Icon, label }) => (
+ {socialLinks.map(({ icon: Icon, label, href }) => (
@@ -207,15 +204,26 @@ export default function Header({ categoryColumns }: { categoryColumns: CategoryN
)}
- {headerNavLinks.map((link) => (
-
- {link.title}
-
- ))}
+ {headerNavLinks.map((link) =>
+ link.href.startsWith("#") ? (
+
+ {link.title}
+
+ ) : (
+ setMobileOpen(false)}
+ className="block py-3 text-sm font-bold text-ink border-b border-line"
+ >
+ {link.title}
+
+ )
+ )}
- {socialLinks.map(({ icon: Icon, label }) => (
+ {socialLinks.map(({ icon: Icon, label, href }) => (
diff --git a/src/components/ProductGallery.tsx b/src/components/ProductGallery.tsx
index 26bc698..5884f53 100644
--- a/src/components/ProductGallery.tsx
+++ b/src/components/ProductGallery.tsx
@@ -42,7 +42,7 @@ export default function ProductGallery({ images, title }: { images: string[]; ti
{gallery.length > 1 && (
-
+
{gallery.map((src, i) => (