Skip to content

Commit

Permalink
card component enhanced
Browse files Browse the repository at this point in the history
  • Loading branch information
yashgoyal0110 committed Mar 2, 2025
1 parent 6a15a66 commit b1b11fd
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions frontend/src/components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ import DisplayIcon from 'components/DisplayIcon'
import Markdown from 'components/MarkdownWrapper'
import { Tooltip } from 'components/ui/tooltip'

// Initial check for mobile screen size
const isMobileInitial = typeof window !== 'undefined' && window.innerWidth < desktopViewMinWidth

const Card = ({
title,
url,
Expand All @@ -30,17 +27,6 @@ const Card = ({
social,
tooltipLabel,
}: CardProps) => {
const [isMobile, setIsMobile] = useState(isMobileInitial)

// Resize listener to adjust display based on screen width
useEffect(() => {
const checkMobile = () => {
const mobile = window.innerWidth < desktopViewMinWidth
setIsMobile(mobile)
}
window.addEventListener('resize', checkMobile)
return () => window.removeEventListener('resize', checkMobile)
}, [])

const hasSocial = social && social.length > 0
const hasContributors = topContributors && topContributors.length > 0
Expand Down

0 comments on commit b1b11fd

Please sign in to comment.