diff --git a/app/[lang]/[carType]/[carDeatil]/page.tsx b/app/[lang]/[carType]/[carDeatil]/page.tsx index b5082de..e447baf 100644 --- a/app/[lang]/[carType]/[carDeatil]/page.tsx +++ b/app/[lang]/[carType]/[carDeatil]/page.tsx @@ -8,11 +8,10 @@ import { usePathname, useParams } from "next/navigation"; import { logoImg } from "@/assets"; import { useSubCategory } from "@/store/subCategory"; import { minimumValues } from "@/data/minimimValues"; -import { useTranslation } from "react-i18next"; +import { useTranslations } from "next-intl"; import { LoadingSkeleton } from "@/components/loadingProduct"; import { EmptyState } from "@/components/emptyState"; import { ErrorState } from "@/components/errorState"; -// for gitea const baseUrl = "https://api.spes-texnika.uz/api/v1/products/"; @@ -33,7 +32,7 @@ function checkCategory(categoryName: string | undefined, lang: string) { } export default function CarDetailPage() { - const { t } = useTranslation(); + const t = useTranslations(); const [modalOpen, setModalOpen] = useState(false); const initialSubCategory = useSubCategory( @@ -127,14 +126,11 @@ export default function CarDetailPage() { dir="ltr" className="my-10 max-w-[1200px] w-full mx-auto space-y-8 flex flex-col items-start justify-center px-2" > - {/* Mashina nomi */}
- {/* Rasmi + asosiy narx ma'lumotlari */}
- {/* Mashina rasmi */}
- {/* Asosiy ma'lumotlar */}
{isMinimum ?

{text}

: } : @@ -166,13 +161,11 @@ export default function CarDetailPage() {
)} - {/* Izoh */}
- {/* Buyurtma tugmasi */}
- {/* Texnik xususiyatlar */} {firstData?.features.length > 0 && (

@@ -205,7 +197,6 @@ export default function CarDetailPage() {

)} - {/* Ijara modal */} ; // ✅ Promise shaklda + params: Promise<{ lang: string }>; }) { - const { lang } = await params; // ✅ await bilan destructuring + const { lang } = await params; + const messages = await getMessages(); return ( - -
- - - {children} -
- -
-