fix:mobile hero view

This commit is contained in:
2026-03-02 15:13:19 +01:00
parent 973b07e177
commit 5d8c3b3e77

View File

@@ -14,12 +14,18 @@ export default function Hero() {
const scrollToRegistration = () => {
const registrationSection = document.getElementById("registration");
if (registrationSection) {
// Temporarily disable scroll-snap to prevent snap-back on mobile
document.documentElement.style.scrollSnapType = "none";
registrationSection.scrollIntoView({ behavior: "smooth" });
// Re-enable scroll-snap after smooth scroll completes
setTimeout(() => {
document.documentElement.style.scrollSnapType = "";
}, 800);
}
};
return (
<section className="snap-section relative h-screen w-full overflow-hidden bg-white">
<section className="snap-section relative h-[100dvh] w-full overflow-hidden bg-white">
{/* Desktop Layout - hidden on mobile */}
<div className="relative hidden h-full w-full flex-col gap-[10px] p-[10px] lg:flex">
{/* Desktop Microphone - positioned on top of top sections, under bottom sections */}
@@ -150,7 +156,7 @@ export default function Hero() {
</div>
{/* Mobile CTA */}
<div className="px-[10px] pb-[10px]">
<div className="px-[10px] pb-[calc(10px+env(safe-area-inset-bottom))]">
<button
onClick={scrollToRegistration}
type="button"