fix:mobile hero view
This commit is contained in:
@@ -14,12 +14,18 @@ export default function Hero() {
|
|||||||
const scrollToRegistration = () => {
|
const scrollToRegistration = () => {
|
||||||
const registrationSection = document.getElementById("registration");
|
const registrationSection = document.getElementById("registration");
|
||||||
if (registrationSection) {
|
if (registrationSection) {
|
||||||
|
// Temporarily disable scroll-snap to prevent snap-back on mobile
|
||||||
|
document.documentElement.style.scrollSnapType = "none";
|
||||||
registrationSection.scrollIntoView({ behavior: "smooth" });
|
registrationSection.scrollIntoView({ behavior: "smooth" });
|
||||||
|
// Re-enable scroll-snap after smooth scroll completes
|
||||||
|
setTimeout(() => {
|
||||||
|
document.documentElement.style.scrollSnapType = "";
|
||||||
|
}, 800);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
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 */}
|
{/* Desktop Layout - hidden on mobile */}
|
||||||
<div className="relative hidden h-full w-full flex-col gap-[10px] p-[10px] lg:flex">
|
<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 */}
|
{/* Desktop Microphone - positioned on top of top sections, under bottom sections */}
|
||||||
@@ -150,7 +156,7 @@ export default function Hero() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Mobile CTA */}
|
{/* Mobile CTA */}
|
||||||
<div className="px-[10px] pb-[10px]">
|
<div className="px-[10px] pb-[calc(10px+env(safe-area-inset-bottom))]">
|
||||||
<button
|
<button
|
||||||
onClick={scrollToRegistration}
|
onClick={scrollToRegistration}
|
||||||
type="button"
|
type="button"
|
||||||
|
|||||||
Reference in New Issue
Block a user