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(Each square represents $100 in earnings. Watch your monthly potential grow.
10 sales = $1,000
25 sales = $2,500
50 sales = $5,000
100 sales = $10,000