diff --git a/app/[locale]/cart/page.tsx b/app/[locale]/cart/page.tsx index 57609ae..4a3e8d3 100644 --- a/app/[locale]/cart/page.tsx +++ b/app/[locale]/cart/page.tsx @@ -202,6 +202,7 @@ export default function CartPage() { ...item, quantity: quantity, price: price, + description: item.product.description, total: total, seller: seller, price_formatted: `${item.product.price_amount} TMT`, diff --git a/app/[locale]/category/[slug]/page.tsx b/app/[locale]/category/[slug]/page.tsx index ce96469..30acb78 100644 --- a/app/[locale]/category/[slug]/page.tsx +++ b/app/[locale]/category/[slug]/page.tsx @@ -8,12 +8,12 @@ export const revalidate = 600; // ISR: Revalidate every 10 minutes const CATEGORY_META = { tm: { - suffix: " | Post shop", + suffix: " | SmartElectronics", description: "Kategoriýa boýunça harytlary gözläň", ogLocale: "tk_TM", }, ru: { - suffix: " | Post shop", + suffix: " | SmartElectronics", description: "Просмотр товаров в данной категории", ogLocale: "ru_RU", }, diff --git a/app/[locale]/collections/[slug]/page.tsx b/app/[locale]/collections/[slug]/page.tsx index 309e4f8..dc7bd2f 100644 --- a/app/[locale]/collections/[slug]/page.tsx +++ b/app/[locale]/collections/[slug]/page.tsx @@ -8,12 +8,12 @@ export const revalidate = 600; // ISR: 10 minutes const META = { tm: { - titleSuffix: " | Post shop", + titleSuffix: " | SmartElectronics", description: (name: string) => `${name} kolleksiýasyndaky harytlary gözläň`, ogLocale: "tk_TM", }, ru: { - titleSuffix: " | Post shop", + titleSuffix: " | SmartElectronics", description: (name: string) => `Просмотр товаров из коллекции «${name}»`, ogLocale: "ru_RU", }, diff --git a/app/[locale]/info/page.tsx b/app/[locale]/info/page.tsx new file mode 100644 index 0000000..20a39d5 --- /dev/null +++ b/app/[locale]/info/page.tsx @@ -0,0 +1,124 @@ +"use client"; + +import { useTranslations } from "next-intl"; +import { + Instagram, + Phone, + Mail, + MessageSquare, + ChevronLeft, +} from "lucide-react"; +import Image from "next/image"; +import Link from "next/link"; +import { useRouter } from "next/navigation"; +import Logo from "@/public/logo.png"; +import { Button } from "@/components/ui/button"; + +export default function InfoPage() { + const t = useTranslations("common"); + const router = useRouter(); + + const contactItems = [ + { + icon: , + label: t("phone"), + value: "+993 65 123456", + href: "tel:+99365123456", + color: "bg-blue-50 text-blue-600", + }, + { + icon: , + label: t("instagram"), + value: "@smartelectronics", + href: "https://instagram.com/smartelectronics", + color: "bg-pink-50 text-pink-600", + }, + { + icon: , + label: t("email"), + value: "info@smartelectronics.com", + href: "mailto:info@smartelectronics.com", + color: "bg-gray-50 text-gray-600", + }, + { + icon: , + label: t("imo"), + value: "+993 65 123456", + href: null, + color: "bg-emerald-50 text-emerald-600", + }, + ]; + + return ( +
+ {/* +
+ +

{t("info")}

+
*/} + +
+ {/* Logo Section */} +
+
+ Logo +
+

+ SmartElectronics - yerli we daşary ýurt harytlarynyň onlaýn marketi. +

+
+ + {/* Contact Grid */} +
+

+ {t("contact_us")} +

+ + {contactItems.map((item, index) => { + const Content = ( +
+
+ {item.icon} +
+
+ + {item.label} + + + {item.value} + +
+
+ ); + + if (item.href) { + return ( + + {Content} + + ); + } + + return
{Content}
; + })} +
+
+
+ ); +} diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx index e63f00c..cb261de 100644 --- a/app/[locale]/layout.tsx +++ b/app/[locale]/layout.tsx @@ -1,61 +1,65 @@ -import type React from "react" -import type { Metadata } from "next" -import { Geist, Geist_Mono } from "next/font/google" -import { notFound } from "next/navigation" -import { NextIntlClientProvider } from "next-intl" -import "./globals.css" -import Header from "@/components/layout/Header" -import MobileBottomNav from "@/components/layout/MobileBar" -import { Toaster } from "@/components/ui/sonner" -import { Providers } from "@/context/Provider" -import AuthWrapper from "@/context/AuthWrapper" +import type React from "react"; +import type { Metadata } from "next"; +import { Geist, Geist_Mono } from "next/font/google"; +import { notFound } from "next/navigation"; +import { NextIntlClientProvider } from "next-intl"; +import "./globals.css"; +import Header from "@/components/layout/Header"; +import MobileBottomNav from "@/components/layout/MobileBar"; +import Footer from "@/components/layout/Footer"; +import { Toaster } from "@/components/ui/sonner"; +import { Providers } from "@/context/Provider"; +import AuthWrapper from "@/context/AuthWrapper"; const geistSans = Geist({ variable: "--font-geist-sans", subsets: ["latin"], -}) +}); const geistMono = Geist_Mono({ variable: "--font-geist-mono", subsets: ["latin"], -}) +}); export const metadata: Metadata = { - title: "Postshop", + title: "SmartElectronics", description: "E-commerce platform", -} +}; type Props = { - children: React.ReactNode - params: Promise<{ locale: string }> -} + children: React.ReactNode; + params: Promise<{ locale: string }>; +}; -const locales = ["ru", "tm"] +const locales = ["ru", "tm"]; export function generateStaticParams() { - return locales.map((locale) => ({ locale })) + return locales.map((locale) => ({ locale })); } export default async function RootLayout({ children, params }: Props) { - const { locale } = await params + const { locale } = await params; - if (!locales.includes(locale)) notFound() + if (!locales.includes(locale)) notFound(); - let messages + let messages; try { - messages = (await import(`../../i18n/messages/${locale}.json`)).default + messages = (await import(`../../i18n/messages/${locale}.json`)).default; } catch { - messages = {} + messages = {}; } return ( - +
{children} +