hot fix for buttons on mobile

This commit is contained in:
Caretaker0699 2023-06-23 13:24:09 -07:00
parent 7ad234ec36
commit 169f514a4e

View File

@ -52,13 +52,6 @@ const Section = ({
isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
}
const handlePlayVideo = () => {
if (videoRef.current) {
videoRef.current.play();
setHasInteracted(true);
}
};
const Heading = headingLevel === 1 ? "h1" : "h2";
return (
@ -90,14 +83,9 @@ const Section = ({
</div>
<div className="flex justify-start space-x-4">
{isMobile && !hasInteracted ? (
<button
onClick={handlePlayVideo}
className="px-4 mt-8 mx-5 py-2 text-white"
>
{buttonOneText}
</button>
<VideoButton videoId={videoId} buttonText={buttonOneText} />
) : (
<VideoButton videoId={videoId} buttonOneText={buttonOneText} />
<VideoButton videoId={videoId} buttonText={buttonOneText} />
)}
{buttonLink && (
<Link