Update src/app/page.tsx
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||||
import ReactLenis from "lenis/react";
|
import ReactLenis from "lenis/react";
|
||||||
|
import { useState } from "react";
|
||||||
import ContactSplitForm from '@/components/sections/contact/ContactSplitForm';
|
import ContactSplitForm from '@/components/sections/contact/ContactSplitForm';
|
||||||
import FaqBase from '@/components/sections/faq/FaqBase';
|
import FaqBase from '@/components/sections/faq/FaqBase';
|
||||||
import FeatureCardMedia from '@/components/sections/feature/FeatureCardMedia';
|
import FeatureCardMedia from '@/components/sections/feature/FeatureCardMedia';
|
||||||
@@ -14,6 +15,14 @@ import ProductCardFour from '@/components/sections/product/ProductCardFour';
|
|||||||
import TestimonialCardSixteen from '@/components/sections/testimonial/TestimonialCardSixteen';
|
import TestimonialCardSixteen from '@/components/sections/testimonial/TestimonialCardSixteen';
|
||||||
|
|
||||||
export default function LandingPage() {
|
export default function LandingPage() {
|
||||||
|
const [lang, setLang] = useState('RU');
|
||||||
|
|
||||||
|
const toggleLang = () => {
|
||||||
|
const langs = ['RU', 'EN', 'FA'];
|
||||||
|
const nextIndex = (langs.indexOf(lang) + 1) % langs.length;
|
||||||
|
setLang(langs[nextIndex]);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeProvider
|
<ThemeProvider
|
||||||
defaultButtonVariant="directional-hover"
|
defaultButtonVariant="directional-hover"
|
||||||
@@ -38,6 +47,14 @@ export default function LandingPage() {
|
|||||||
]}
|
]}
|
||||||
brandName="ФАРУС"
|
brandName="ФАРУС"
|
||||||
/>
|
/>
|
||||||
|
<div className="fixed top-4 right-4 z-50">
|
||||||
|
<button
|
||||||
|
onClick={toggleLang}
|
||||||
|
className="bg-primary-cta text-white px-4 py-2 rounded-full font-semibold shadow-lg hover:scale-105 transition-transform"
|
||||||
|
>
|
||||||
|
{lang}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="hero" data-section="hero">
|
<div id="hero" data-section="hero">
|
||||||
|
|||||||
Reference in New Issue
Block a user