From 1693624772d511ebf7ae2f194275e73ae31fe262 Mon Sep 17 00:00:00 2001 From: xbrzee Date: Mon, 20 Apr 2026 20:37:37 +0545 Subject: [PATCH] fix:fix card border not appearing alternatively i.e 1st and 3rd Card in Mobile View --- .../app/sections/Benefits/BenefitsCard.tsx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/sections/Benefits/BenefitsCard.tsx b/frontend/src/app/sections/Benefits/BenefitsCard.tsx index 10128dd..448d7a7 100644 --- a/frontend/src/app/sections/Benefits/BenefitsCard.tsx +++ b/frontend/src/app/sections/Benefits/BenefitsCard.tsx @@ -1,3 +1,6 @@ +'use client' + +import { useState, useEffect } from 'react'; import CardDark from "@/app/components/BenefitsOfParticipating/CardDark"; import CardLight from "@/app/components/BenefitsOfParticipating/CardLight"; import NewNetworksSVG from "@/app/assets/images/NewNetworks"; @@ -11,6 +14,19 @@ import BenefitsCardFourth from "@/app/assets/images/BenefitsCardFourth"; export default function BenefitsCards() { + const [isMobile, setIsMobile] = useState(false); + + useEffect(() => { + const handleResize = () => { + setIsMobile(window.innerWidth < 1024); + }; + + handleResize(); + + window.addEventListener("resize", handleResize); + return () => window.removeEventListener("resize", handleResize); + },[]); + return (
@@ -32,13 +48,14 @@ export default function BenefitsCards() {
} /> }