Skip to content

Commit

Permalink
fix: update TypeScript types for StatsCard component
Browse files Browse the repository at this point in the history
  • Loading branch information
Adil512 committed Dec 19, 2024
1 parent 1fe0677 commit 6d22aaf
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions website/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@
import { Shield, Zap, Lock, Chrome, Download } from 'lucide-react'
import { useState } from 'react'

// Add these type definitions
interface StatsCardProps {
icon: JSX.Element; // Changed from React.ReactNode to JSX.Element
number: string;
label: string;
}

interface FeatureCardProps {
icon: JSX.Element; // Changed from React.ReactNode to JSX.Element
title: string;
description: string;
}

// Update the StatsCard component with explicit typing
const StatsCard: React.FC<StatsCardProps> = ({ icon, number, label }) => (
<div className="bg-white/5 rounded-2xl p-8 text-center transform transition hover:scale-105">
<div className="flex justify-center mb-4">{icon}</div>
<div className="text-4xl font-bold text-white mb-2">{number}</div>
<div className="text-gray-400">{label}</div>
</div>
)
export default function Home() {
const [activeBrowser, setActiveBrowser] = useState('chrome')

Expand Down Expand Up @@ -193,13 +214,7 @@ export default function Home() {
)
}

const StatsCard = ({ icon, number, label }) => (
<div className="bg-white/5 rounded-2xl p-8 text-center transform transition hover:scale-105">
<div className="flex justify-center mb-4">{icon}</div>
<div className="text-4xl font-bold text-white mb-2">{number}</div>
<div className="text-gray-400">{label}</div>
</div>
)


const FeatureCard = ({ icon, title, description }) => (
<div className="bg-white/5 rounded-2xl p-6 backdrop-blur-lg transform transition hover:scale-105">
Expand Down

0 comments on commit 6d22aaf

Please sign in to comment.