hot fix for buttons on mobile
This commit is contained in:
parent
7ad234ec36
commit
169f514a4e
@ -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
|
||||
|
Reference in New Issue
Block a user