From 42eef0be694d3131c2d86cc741cbe8b01637c781 Mon Sep 17 00:00:00 2001 From: manasmanohar <21006907+manasmanohar@users.noreply.github.com> Date: Thu, 16 Jan 2025 14:30:20 +0530 Subject: [PATCH] chore: update hero CTA button Signed-off-by: manasmanohar <21006907+manasmanohar@users.noreply.github.com> --- components/hero.tsx | 149 +++++++++++++++++++++++++------------------- 1 file changed, 85 insertions(+), 64 deletions(-) diff --git a/components/hero.tsx b/components/hero.tsx index aad5f94..8197197 100644 --- a/components/hero.tsx +++ b/components/hero.tsx @@ -1,63 +1,73 @@ /* eslint-disable @typescript-eslint/no-unsafe-call */ -"use client"; -import VideoThumb from '@/public/images/demo-thumbnail.webp'; -import ModalVideo from '@/components/modal-video'; -import Image from "next/image"; -import TestimonialImage from "@/public/images/users/Nutanix_Logo.svg"; -import React, { useEffect, useState } from "react"; -import CopyButton from './utils/copyButton'; -import { TrustedBy } from './trustedBy'; -import Link from 'next/link'; -import APItext from "@/public/images/apiText.png"; -import Banner from './ui/banner'; -import OpenInNewIcon from '@mui/icons-material/OpenInNew'; +"use client" +import VideoThumb from "@/public/images/demo-thumbnail.webp" +import ModalVideo from "@/components/modal-video" +import Image from "next/image" +import TestimonialImage from "@/public/images/users/Nutanix_Logo.svg" +import React, { useEffect, useState } from "react" +import CopyButton from "./utils/copyButton" +import { TrustedBy } from "./trustedBy" +import Link from "next/link" +import APItext from "@/public/images/apiText.png" +import Banner from "./ui/banner" +import OpenInNewIcon from "@mui/icons-material/OpenInNew" export default function Hero() { - const [isMobile, setIsMobile] = useState(false); + const [isMobile, setIsMobile] = useState(false) // Detect screen size on component mount and update state useEffect(() => { const handleResize = () => { - setIsMobile(window.innerWidth <= 1038); // Adjust this breakpoint as needed - }; - - handleResize(); // Check on mount - window.addEventListener("resize", handleResize); + setIsMobile(window.innerWidth <= 1038) // Adjust this breakpoint as needed + } + + handleResize() // Check on mount + window.addEventListener("resize", handleResize) // Cleanup listener on component unmount - return () => window.removeEventListener("resize", handleResize); - }, []); + return () => window.removeEventListener("resize", handleResize) + }, []) return (
- {/* Illustration behind hero content */} -
- ); + ) }