language bug fixing
This commit is contained in:
30
app/[lang]/layout.tsx
Normal file
30
app/[lang]/layout.tsx
Normal 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
23
app/[lang]/page.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
@@ -52,21 +52,6 @@ body {
|
||||
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 */
|
||||
@keyframes icon_animatsion_tool {
|
||||
from{
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// app/layout.tsx
|
||||
import type { Metadata } from "next";
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import { dir } from "i18next";
|
||||
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({
|
||||
variable: "--font-geist-sans",
|
||||
@@ -19,28 +14,17 @@ const geistMono = Geist_Mono({
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Create Next App",
|
||||
description: "Generated by create next app",
|
||||
title: "My App",
|
||||
description: "Multilingual Next.js 15 App",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
params,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
params: { lang: string };
|
||||
}>) {
|
||||
}: Readonly<{ children: React.ReactNode }>) {
|
||||
return (
|
||||
<html lang={params.lang} dir={dir(params.lang)}>
|
||||
<body>
|
||||
<Header />
|
||||
<Navbar />
|
||||
<html lang="uz">
|
||||
<body className={`${geistSans.variable} ${geistMono.variable} antialiased`}>
|
||||
{children}
|
||||
<section id="contact" className="">
|
||||
<Contact />
|
||||
</section>
|
||||
<Footer />
|
||||
<UpScrollIcon />
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
||||
23
app/page.tsx
23
app/page.tsx
@@ -1,23 +1,6 @@
|
||||
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";
|
||||
// app/page.tsx
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<div>
|
||||
<section id="products" className="mt-50 mb-10">
|
||||
<Products />
|
||||
</section>
|
||||
<Texnika />
|
||||
<Offer />
|
||||
<CustomSlider/>
|
||||
<Faq />
|
||||
<Partners />
|
||||
<Map />
|
||||
</div>
|
||||
);
|
||||
redirect("/uz");
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import type { NextConfig } from "next";
|
||||
const {i18n} = require("./next-i18next.config");
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
i18n,
|
||||
// next.config.ts
|
||||
const nextConfig = {
|
||||
reactStrictMode: true,
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
||||
Reference in New Issue
Block a user