import React, { useState, useEffect } from 'react'; import { DollarSign, Users, Calculator, Target, ChevronRight, Star, TrendingUp, Zap } from 'lucide-react'; const Grid = () => { const [selectedCells, setSelectedCells] = useState(0); const [isAnimating, setIsAnimating] = useState(false); const GRID_SIZE = 10; const COMMISSION = 100; const CELLS_TOTAL = GRID_SIZE * GRID_SIZE; const TOTAL_POTENTIAL = COMMISSION * CELLS_TOTAL; const calculateEarnings = (cells) => { return cells * COMMISSION; }; const getColorForCell = (index) => { if (index < selectedCells) { return 'bg-green-500'; } return 'bg-gray-800'; }; const handleSliderChange = (e) => { setSelectedCells(parseInt(e.target.value)); }; const animateToAmount = (amount) => { setIsAnimating(true); const targetCells = Math.floor(amount / COMMISSION); let current = 0; const interval = setInterval(() => { current += Math.ceil(targetCells / 20); if (current >= targetCells) { setSelectedCells(targetCells); clearInterval(interval); setIsAnimating(false); } else { setSelectedCells(current); } }, 30); }; // Create grid rows and cells const renderGrid = () => { const rows = []; for (let i = 0; i < GRID_SIZE; i++) { const cells = []; for (let j = 0; j < GRID_SIZE; j++) { const index = i * GRID_SIZE + j; cells.push(
); } rows.push(
{cells}
); } return rows; }; return (
{/* Updated Header */}

Your Path to $10,000/month

Each square represents $100 in earnings. Watch your monthly potential grow.

{/* Stats Bar */}
Selected Customers
{selectedCells.toLocaleString()}
Potential Earnings
${calculateEarnings(selectedCells).toLocaleString()}
Commission Per Sale
${COMMISSION}
Progress to $10K
{((calculateEarnings(selectedCells) / TOTAL_POTENTIAL) * 100).toFixed(1)}%
{/* Grid Container */}
{renderGrid()}
{/* Controls Below Grid */}
{/* Updated Quick Target Buttons */}
{[1000, 2500, 5000, 7500, 10000].map((amount) => ( ))}
{/* Slider Control */}
{/* Updated Goal Cards */}

Quick Start

10 sales = $1,000

Growth Goal

25 sales = $2,500

Scale Goal

50 sales = $5,000

Freedom Goal

100 sales = $10,000

); }; export default Grid