From 77c6baaa556e3c8f43c77d055d0f82991f2dca1c Mon Sep 17 00:00:00 2001 From: "nabijonovdavronbek619@gmail.com" Date: Tue, 28 Apr 2026 11:29:06 +0500 Subject: [PATCH] slider component updated --- app/[lang]/[carType]/[carDeatil]/page.tsx | 13 +- app/[lang]/layout.tsx | 31 +- components/cards/sliderCard.tsx | 12 +- components/lib_components/carRentalModal.tsx | 25 +- components/lib_components/text.tsx | 6 +- components/lib_components/time.tsx | 4 +- components/nav_foot/header.tsx | 3 - components/nav_foot/navbar.tsx | 32 +- components/pageParts/contact.tsx | 7 +- components/pageParts/newsSlider.tsx | 84 +- components/pageParts/products/products.tsx | 5 +- data/index.ts | 1434 ------------------ i18n/index.ts | 24 - i18n/navigation.ts | 5 + i18n/request.ts | 15 + i18n/routing.ts | 6 + messages/ru.json | 207 +++ messages/uz.json | 207 +++ middleware.ts | 8 + next-i18next.config.js | 8 - next.config.ts | 21 +- package-lock.json | 912 ++++++++--- package.json | 7 +- types/css.d.ts | 1 + types/index.ts | 1 - 25 files changed, 1308 insertions(+), 1770 deletions(-) delete mode 100644 data/index.ts delete mode 100644 i18n/index.ts create mode 100644 i18n/navigation.ts create mode 100644 i18n/request.ts create mode 100644 i18n/routing.ts create mode 100644 messages/ru.json create mode 100644 messages/uz.json create mode 100644 middleware.ts delete mode 100644 next-i18next.config.js create mode 100644 types/css.d.ts 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} -
- -
-