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 (
{/* Decorative grid lines */}
{/* Accent glow */}
{/* Logo - Using your app icon */}
Train Right

TRAIN RIGHT

powered by dubllabs

{/* Name Input */}
setForm({...form, name: e.target.value})} maxLength={12} placeholder="ENTER NAME" style={{ width: '100%', padding: '18px 20px', background: 'rgba(255,255,255,0.05)', border: '1px solid rgba(255,255,255,0.1)', borderRadius: '12px', color: '#fff', fontSize: '16px', letterSpacing: '2px', outline: 'none', transition: 'all 0.3s ease', boxSizing: 'border-box' }} />
{/* Age & Weight Row */}
setForm({...form, age: e.target.value})} placeholder="25" style={{ width: '100%', padding: '18px 20px', background: 'rgba(255,255,255,0.05)', border: '1px solid rgba(255,255,255,0.1)', borderRadius: '12px', color: '#fff', fontSize: '16px', letterSpacing: '2px', outline: 'none', boxSizing: 'border-box' }} />
setForm({...form, weight: e.target.value})} placeholder="180" style={{ width: '100%', padding: '18px 20px', background: 'rgba(255,255,255,0.05)', border: '1px solid rgba(255,255,255,0.1)', borderRadius: '12px', color: '#fff', fontSize: '16px', letterSpacing: '2px', outline: 'none', boxSizing: 'border-box' }} />
{/* Height Row */}
setForm({...form, feet: e.target.value})} placeholder="FT" style={{ flex: 1, padding: '18px 20px', background: 'rgba(255,255,255,0.05)', border: '1px solid rgba(255,255,255,0.1)', borderRadius: '12px', color: '#fff', fontSize: '16px', letterSpacing: '2px', outline: 'none', boxSizing: 'border-box' }} /> setForm({...form, inches: e.target.value})} placeholder="IN" style={{ flex: 1, padding: '18px 20px', background: 'rgba(255,255,255,0.05)', border: '1px solid rgba(255,255,255,0.1)', borderRadius: '12px', color: '#fff', fontSize: '16px', letterSpacing: '2px', outline: 'none', boxSizing: 'border-box' }} />
{/* Goal Selection */}
{[ { key: 'lose', label: 'CUT', icon: TrendingUp }, { key: 'maintain', label: 'MAINTAIN', icon: Target }, { key: 'gain', label: 'BULK', icon: Zap } ].map(({ key, label, icon: Icon }) => ( ))}
{/* Submit Button */}
); }