import React, { useRef } from 'react'; import { motion, useInView } from 'framer-motion'; import { XCircle, CheckCircle2 } from 'lucide-react'; export const ProblemComparison: React.FC = () => { const containerRef = useRef(null); const oldWayRef = useRef(null); const newWayRef = useRef(null); // Adjusted margin to make the transition happen exactly when the "New Way" text enters the middle of the screen const isNewWayInView = useInView(newWayRef, { margin: "-40% 0px -40% 0px" }); return (
{/* Left Column: Scrollable Text */}
{/* Block 1: Old Way */}
The Rearview Mirror

Reactive Logging &
Gamified Shame.

Traditional apps tell you what you did wrong after the fact. Seeing red numbers and negative feedback loops kills motivation, turning nutrition into a burden rather than a tool.

{/* Block 2: New Way */}
The GPS

Proactive Guidance &
Actionable Intelligence.

FitMate tells you what to eat *next*. We use Adherence Buffers to automatically adjust your future meals if you slip up, keeping you on track without the guilt trip.

{/* Right Column: Sticky Visuals */}
{/* Old Way Card */}
Limit Exceeded +240 kcal
{/* New Way Card */}
Recalculating path...
Dinner target adjusted:
-15g Fat, +20g Protein
); };