diff --git a/src/app/[locale]/about/page.tsx b/src/app/[locale]/about/page.tsx index 38039be..651d2df 100644 --- a/src/app/[locale]/about/page.tsx +++ b/src/app/[locale]/about/page.tsx @@ -3,18 +3,42 @@ import Header from "@/components/layout/Header"; import Footer from "@/components/layout/Footer"; import { getPageMetadata } from "@/lib/i18n/pageMetadata"; import { isValidLocale, DEFAULT_LOCALE, type Locale } from "@/lib/i18n/locales"; +import { getPageKeywords } from "@/lib/seo/keywords"; +import { Metadata } from "next"; + +const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://dev.manoonoils.com"; interface AboutPageProps { params: Promise<{ locale: string }>; } -export async function generateMetadata({ params }: AboutPageProps) { +export async function generateMetadata({ params }: AboutPageProps): Promise { const { locale } = await params; const validLocale = isValidLocale(locale) ? locale : DEFAULT_LOCALE; const metadata = getPageMetadata(validLocale as Locale); + const keywords = getPageKeywords(validLocale as Locale, 'about'); + + const localePrefix = validLocale === DEFAULT_LOCALE ? "" : `/${validLocale}`; + const canonicalUrl = `${baseUrl}${localePrefix}/about`; + return { title: metadata.about.title, description: metadata.about.description, + keywords: [...keywords.primary, ...keywords.secondary].join(', '), + alternates: { + canonical: canonicalUrl, + }, + openGraph: { + title: metadata.about.title, + description: metadata.about.description, + type: 'website', + url: canonicalUrl, + }, + twitter: { + card: 'summary', + title: metadata.about.title, + description: metadata.about.description, + }, }; } diff --git a/src/app/[locale]/contact/ContactPageClient.tsx b/src/app/[locale]/contact/ContactPageClient.tsx new file mode 100644 index 0000000..414bbc7 --- /dev/null +++ b/src/app/[locale]/contact/ContactPageClient.tsx @@ -0,0 +1,195 @@ +"use client"; + +import { useState } from "react"; +import { useTranslations, useLocale } from "next-intl"; +import Header from "@/components/layout/Header"; +import Footer from "@/components/layout/Footer"; +import { Mail, MapPin, Truck, Check } from "lucide-react"; + +interface ContactPageClientProps { + locale: string; +} + +export default function ContactPageClient({ locale }: ContactPageClientProps) { + const t = useTranslations("Contact"); + const [formData, setFormData] = useState({ + name: "", + email: "", + message: "", + }); + const [submitted, setSubmitted] = useState(false); + + const handleSubmit = (e: React.FormEvent) => { + e.preventDefault(); + setSubmitted(true); + }; + + return ( + <> +
+
+
+
+
+ + {t("subtitle")} + +

+ {t("title")} +

+

+ {t("getInTouchDesc")} +

+
+
+
+ +
+
+
+
+

+ {t("getInTouch")} +

+

+ {t("getInTouchDesc")} +

+ +
+
+
+ +
+
+

{t("email")}

+

hello@manoonoils.com

+

{t("emailReply")}

+
+
+ +
+
+ +
+
+

{t("shippingTitle")}

+

{t("freeShipping")}

+

{t("deliveryTime")}

+
+
+ +
+
+ +
+
+

{t("location")}

+

{t("locationDesc")}

+

{t("worldwideShipping")}

+
+
+
+
+ +
+ {submitted ? ( +
+
+ +
+

{t("thankYou")}

+

+ {t("thankYouDesc")} +

+
+ ) : ( +
+
+ + setFormData({ ...formData, name: e.target.value })} + className="w-full px-4 py-3 bg-white border border-[#e5e5e5] focus:outline-none focus:border-black transition-colors" + placeholder={t("namePlaceholder")} + /> +
+ +
+ + setFormData({ ...formData, email: e.target.value })} + className="w-full px-4 py-3 bg-white border border-[#e5e5e5] focus:outline-none focus:border-black transition-colors" + placeholder={t("emailPlaceholder")} + /> +
+ +
+ +