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);
|
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";
|
const Heading = headingLevel === 1 ? "h1" : "h2";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -90,14 +83,9 @@ const Section = ({
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex justify-start space-x-4">
|
<div className="flex justify-start space-x-4">
|
||||||
{isMobile && !hasInteracted ? (
|
{isMobile && !hasInteracted ? (
|
||||||
<button
|
<VideoButton videoId={videoId} buttonText={buttonOneText} />
|
||||||
onClick={handlePlayVideo}
|
|
||||||
className="px-4 mt-8 mx-5 py-2 text-white"
|
|
||||||
>
|
|
||||||
{buttonOneText}
|
|
||||||
</button>
|
|
||||||
) : (
|
) : (
|
||||||
<VideoButton videoId={videoId} buttonOneText={buttonOneText} />
|
<VideoButton videoId={videoId} buttonText={buttonOneText} />
|
||||||
)}
|
)}
|
||||||
{buttonLink && (
|
{buttonLink && (
|
||||||
<Link
|
<Link
|
||||||
|
|||||||
Reference in New Issue
Block a user