import React, { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { motion, AnimatePresence } from 'framer-motion'; import { ShieldCheck, TrendingUp, Zap } from 'lucide-react'; const questions = [ { id: 1, text: "What are you saving for?", options: [ { label: "A major purchase soon (house, car)", score: 1 }, { label: "General wealth building", score: 2 }, { label: "Retirement (20+ years away)", score: 3 } ] }, { id: 2, text: "How do you feel about sudden market drops?", options: [ { label: "I'd panic and want to sell", score: 1 }, { label: "I'd be concerned but hold on", score: 2 }, { label: "I'd see it as a buying opportunity", score: 3 } ] }, { id: 3, text: "What is your primary investment goal?", options: [ { label: "Protect my money from losing value", score: 1 }, { label: "Steady, moderate growth over time", score: 2 }, { label: "Maximum growth, regardless of ups and downs", score: 3 } ] } ]; export default function LandingPage({ setRiskProfile }) { const [currentStep, setCurrentStep] = useState(0); const [totalScore, setTotalScore] = useState(0); const navigate = useNavigate(); const handleOptionSelect = (score) => { setTotalScore(prev => prev + score); if (currentStep < questions.length - 1) { setCurrentStep(prev => prev + 1); } else { determineProfile(totalScore + score); } }; const determineProfile = (finalScore) => { let profile = 'Balanced'; if (finalScore <= 4) profile = 'Cautious'; if (finalScore >= 8) profile = 'Bold'; setRiskProfile(profile); navigate('/dashboard'); }; return (
{/* Decorative background elements */}

Wealth management, simplified.

No jargon. No hidden fees. Just clear strategies tailored to your goals. Let's find out what kind of investor you are.

{questions.map((q, idx) => (
{idx < questions.length - 1 &&
}
))}

{questions[currentStep].text}

{questions[currentStep].options.map((option, idx) => ( ))}
); }