import React, { useState } from 'react'; import { ChevronRight, Target, TrendingUp, Zap } from 'lucide-react'; // ============================================ // DARK ATHLETIC SIGNUP - Updated with app icon // ============================================ export default function SignupDarkAthletic({ onComplete }) { const [form, setForm] = useState({ name: '', age: '', weight: '', feet: '', inches: '', goal: 'lose' }); const handleSubmit = (e) => { e.preventDefault(); if (!form.name || !form.weight) return; // --- THE CALCULATION YOU WERE MISSING --- const weight = parseInt(form.weight); const sedentary = weight * 11; // 2200 for 200lb person const maintenance = sedentary + 300; // 2500 TDEE Average let initialGoal = maintenance; if (form.goal === 'lose') { initialGoal = maintenance - 500; // DROPS IT TO 2000 FOR WEIGHT LOSS } else if (form.goal === 'gain') { initialGoal = maintenance + 300; // 2800 FOR BULKING } if (onComplete) { onComplete({ ...form, plan: form.goal, // Maps 'lose' to 'plan' for the App logic baseGoal: initialGoal // Sends the 2000 calorie number to the App }); } }; return (
powered by dubllabs