fix:mobile hero view
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user