changed some color and fix some styles
This commit is contained in:
@@ -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`,
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
|
||||
124
app/[locale]/info/page.tsx
Normal file
124
app/[locale]/info/page.tsx
Normal file
@@ -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: <Phone className="h-6 w-6" />,
|
||||
label: t("phone"),
|
||||
value: "+993 65 123456",
|
||||
href: "tel:+99365123456",
|
||||
color: "bg-blue-50 text-blue-600",
|
||||
},
|
||||
{
|
||||
icon: <Instagram className="h-6 w-6" />,
|
||||
label: t("instagram"),
|
||||
value: "@smartelectronics",
|
||||
href: "https://instagram.com/smartelectronics",
|
||||
color: "bg-pink-50 text-pink-600",
|
||||
},
|
||||
{
|
||||
icon: <Mail className="h-6 w-6" />,
|
||||
label: t("email"),
|
||||
value: "info@smartelectronics.com",
|
||||
href: "mailto:info@smartelectronics.com",
|
||||
color: "bg-gray-50 text-gray-600",
|
||||
},
|
||||
{
|
||||
icon: <MessageSquare className="h-6 w-6" />,
|
||||
label: t("imo"),
|
||||
value: "+993 65 123456",
|
||||
href: null,
|
||||
color: "bg-emerald-50 text-emerald-600",
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-gray-50 pb-20">
|
||||
{/*
|
||||
<div className="bg-white border-b sticky top-0 z-10 px-4 h-16 flex items-center gap-4">
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={() => router.back()}
|
||||
className="rounded-full"
|
||||
>
|
||||
<ChevronLeft className="h-6 w-6" />
|
||||
</Button>
|
||||
<h1 className="text-xl font-bold">{t("info")}</h1>
|
||||
</div> */}
|
||||
|
||||
<div className="p-4 max-w-md mx-auto space-y-6">
|
||||
{/* Logo Section */}
|
||||
<div className="bg-white rounded-3xl p-8 flex flex-col items-center justify-center shadow-sm border border-gray-100">
|
||||
<div className="relative h-32 w-[220px] mb-4">
|
||||
<Image src={Logo} alt="Logo" fill className="object-contain" />
|
||||
</div>
|
||||
<p className="text-center text-gray-500 text-sm leading-relaxed">
|
||||
SmartElectronics - yerli we daşary ýurt harytlarynyň onlaýn marketi.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Contact Grid */}
|
||||
<div className="grid gap-4">
|
||||
<h2 className="text-sm font-semibold text-gray-400 uppercase tracking-wider px-2">
|
||||
{t("contact_us")}
|
||||
</h2>
|
||||
|
||||
{contactItems.map((item, index) => {
|
||||
const Content = (
|
||||
<div className="flex items-center gap-4 p-4 bg-white rounded-2xl border border-gray-100 shadow-sm active:bg-gray-50 transition-colors">
|
||||
<div className={`p-3 rounded-xl ${item.color}`}>
|
||||
{item.icon}
|
||||
</div>
|
||||
<div className="flex flex-col">
|
||||
<span className="text-xs text-gray-400 font-medium">
|
||||
{item.label}
|
||||
</span>
|
||||
<span className="text-base font-semibold text-gray-900">
|
||||
{item.value}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
if (item.href) {
|
||||
return (
|
||||
<a
|
||||
key={index}
|
||||
href={item.href}
|
||||
target={item.href.startsWith("http") ? "_blank" : undefined}
|
||||
rel={
|
||||
item.href.startsWith("http")
|
||||
? "noopener noreferrer"
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
{Content}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
return <div key={index}>{Content}</div>;
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -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 (
|
||||
<html lang={locale} suppressHydrationWarning>
|
||||
<body className={`${geistSans.variable} ${geistMono.variable} antialiased`}>
|
||||
<body
|
||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||
>
|
||||
<Providers>
|
||||
<NextIntlClientProvider locale={locale} messages={messages}>
|
||||
<AuthWrapper locale={locale}>
|
||||
<Header locale={locale} />
|
||||
{children}
|
||||
<Footer />
|
||||
<MobileBottomNav locale={locale} />
|
||||
<Toaster />
|
||||
</AuthWrapper>
|
||||
@@ -63,5 +67,5 @@ export default async function RootLayout({ children, params }: Props) {
|
||||
</Providers>
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,11 +3,11 @@ import OrdersPageClient from "../../../features/orders/components/OrderPage";
|
||||
|
||||
const metadataContent = {
|
||||
tm: {
|
||||
title: "Meniň Sargytlarym | Post shop",
|
||||
title: "Meniň Sargytlarym | SmartElectronics",
|
||||
description: "Sargytlaryňyzy görüň",
|
||||
},
|
||||
ru: {
|
||||
title: "Мои Заказы | Пост-магазин",
|
||||
title: "Мои Заказы | SmartElectronics",
|
||||
description: "Просмотр истории заказов",
|
||||
},
|
||||
} as const;
|
||||
|
||||
@@ -7,7 +7,7 @@ const META = {
|
||||
description: "Качественные товары с быстрой доставкой по всей стране",
|
||||
},
|
||||
tm: {
|
||||
title: "Post shop - Iň gowy harytlar, amatly bahada",
|
||||
title: "SmartElectronics - Iň gowy harytlar, amatly bahada",
|
||||
description:
|
||||
"Ýokary hilli harytlar. Elektronika, eşik, arassaçylyk, sport, kosmetika",
|
||||
},
|
||||
|
||||
23
app/[locale]/search/page.tsx
Normal file
23
app/[locale]/search/page.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { Metadata } from "next";
|
||||
import SearchPageClient from "@/features/search/components/SearchPageClient";
|
||||
|
||||
type Props = {
|
||||
params: Promise<{ locale: string }>;
|
||||
searchParams: Promise<{ q?: string }>;
|
||||
};
|
||||
|
||||
export async function generateMetadata({
|
||||
searchParams,
|
||||
}: Props): Promise<Metadata> {
|
||||
const { q } = await searchParams;
|
||||
return {
|
||||
title: q ? `Search: ${q} | SmartElectronics` : "Search | SmartElectronics",
|
||||
};
|
||||
}
|
||||
|
||||
export default async function SearchPage(props: Props) {
|
||||
const params = await props.params;
|
||||
const searchParams = await props.searchParams;
|
||||
|
||||
return <SearchPageClient params={params} searchParams={searchParams} />;
|
||||
}
|
||||
BIN
app/favicon.ico
BIN
app/favicon.ico
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 178 KiB |
Reference in New Issue
Block a user