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

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>
);
}

View File

@@ -52,21 +52,6 @@ body {
clip-path: polygon(100% 0, 55% 100%, 88% 100%); clip-path: polygon(100% 0, 55% 100%, 88% 100%);
} }
#contactClip{
position: relative;
}
#contactClip::before{
content:'';
position: absolute;
top:-40px;
left: -50px;
z-index: 1000;
padding: 50px;
background-color: #d38307;
clip-path: polygon(100% 0, 55% 100%, 88% 100%);
}
/* footer ekxkavator icon animation */ /* footer ekxkavator icon animation */
@keyframes icon_animatsion_tool { @keyframes icon_animatsion_tool {
from{ from{

View File

@@ -1,12 +1,7 @@
// app/layout.tsx
import type { Metadata } from "next"; import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google"; import { Geist, Geist_Mono } from "next/font/google";
import { dir } from "i18next";
import "./globals.css"; import "./globals.css";
import UpScrollIcon from "@/components/upScroll";
import Contact from "@/components/pageParts/contact";
import Footer from "@/components/nav_foot/footer";
import Navbar from "@/components/nav_foot/navbar";
import Header from "@/components/nav_foot/header";
const geistSans = Geist({ const geistSans = Geist({
variable: "--font-geist-sans", variable: "--font-geist-sans",
@@ -19,28 +14,17 @@ const geistMono = Geist_Mono({
}); });
export const metadata: Metadata = { export const metadata: Metadata = {
title: "Create Next App", title: "My App",
description: "Generated by create next app", description: "Multilingual Next.js 15 App",
}; };
export default function RootLayout({ export default function RootLayout({
children, children,
params, }: Readonly<{ children: React.ReactNode }>) {
}: Readonly<{
children: React.ReactNode;
params: { lang: string };
}>) {
return ( return (
<html lang={params.lang} dir={dir(params.lang)}> <html lang="uz">
<body> <body className={`${geistSans.variable} ${geistMono.variable} antialiased`}>
<Header />
<Navbar />
{children} {children}
<section id="contact" className="">
<Contact />
</section>
<Footer />
<UpScrollIcon />
</body> </body>
</html> </html>
); );

View File

@@ -1,23 +1,6 @@
import Products from "@/components/pageParts/products"; // app/page.tsx
import Texnika from "@/components/pageParts/texnika"; import { redirect } from "next/navigation";
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() { export default function Home() {
return ( redirect("/uz");
<div>
<section id="products" className="mt-50 mb-10">
<Products />
</section>
<Texnika />
<Offer />
<CustomSlider/>
<Faq />
<Partners />
<Map />
</div>
);
} }

View File

@@ -1,8 +1,6 @@
import type { NextConfig } from "next"; // next.config.ts
const {i18n} = require("./next-i18next.config"); const nextConfig = {
reactStrictMode: true,
const nextConfig: NextConfig = {
i18n,
}; };
export default nextConfig; export default nextConfig;