language bug fixing

This commit is contained in:
nabijonovdavronbek619@gmail.com
2025-10-25 16:36:01 +05:00
parent abcccfbf4b
commit f19a20878e
8 changed files with 65 additions and 62 deletions

View File

@@ -0,0 +1,11 @@
import CarType_Header from "@/components/carPageParts/carType_head";
import React, { ReactNode } from "react";
export default function Layout({ children }: { children: ReactNode }) {
return (
<div>
<CarType_Header />
{children}
</div>
);
}

View File

@@ -0,0 +1,13 @@
"use client";
import Title from "@/components/title";
import { useParams } from "next/navigation";
export default function CartType() {
const router = useParams();
return (
<div dir="ltr" className="my-20" >
<Title text="tex-rent" />
</div>
);
}

30
app/[lang]/layout.tsx Normal file
View File

@@ -0,0 +1,30 @@
// app/[lang]/layout.tsx
import { dir } from "i18next";
import Header from "@/components/nav_foot/header";
import Navbar from "@/components/nav_foot/navbar";
import Footer from "@/components/nav_foot/footer";
import Contact from "@/components/pageParts/contact";
import UpScrollIcon from "@/components/upScroll";
export default function LangLayout({
children,
params,
}: Readonly<{
children: React.ReactNode;
params: { lang: "uz" | "ru" };
}>) {
return (
<html lang={params.lang} dir={dir(params.lang)}>
<body>
<Header />
<Navbar />
{children}
<section id="contact">
<Contact />
</section>
<Footer />
<UpScrollIcon />
</body>
</html>
);
}

23
app/[lang]/page.tsx Normal file
View File

@@ -0,0 +1,23 @@
import Products from "@/components/pageParts/products";
import Texnika from "@/components/pageParts/texnika";
import Offer from "@/components/pageParts/offer";
import Faq from "@/components/pageParts/faq";
import Partners from "@/components/pageParts/partners";
import Map from "@/components/pageParts/map";
import CustomSlider from "@/components/pageParts/newsSlider";
export default function Home() {
return (
<div>
<section id="products" className="mt-50 mb-10">
<Products />
</section>
<Texnika />
<Offer />
<CustomSlider/>
<Faq />
<Partners />
<Map />
</div>
);
}