'use client';
import { Heading } from '@/ui/Heading';
import { Stack } from '@/ui/Stack';
import { Text } from '@/ui/Text';
import { motion, useReducedMotion } from 'framer-motion';
import { useEffect, useState } from 'react';
export function RaceHistoryMockup() {
const shouldReduceMotion = useReducedMotion();
const [isMobile, setIsMobile] = useState(false);
useEffect(() => {
const checkMobile = () => setIsMobile(window.innerWidth < 768);
checkMobile();
window.addEventListener('resize', checkMobile);
return () => window.removeEventListener('resize', checkMobile);
}, []);
const itemVariants = {
hidden: { opacity: 0, scale: shouldReduceMotion ? 1 : 0.95 },
visible: { opacity: 1, scale: 1 }
};
// Simple, elegant mobile version - just the core story
if (isMobile) {
return (
{/* Race result - clean and simple */}
P3
Watkins Glen
GT3 SPRINT
{/* Simple arrow */}
↓
{/* Updates - minimal */}
Profile Updated
STATS ↑
+12
);
}
// Desktop version - richer with more updates
return (
{/* Race Result Card - Enhanced */}
P3
Watkins Glen
GT3 SPRINT RACE
24 DRIVERS
•
45 MIN
{/* Connection Flow with Animation */}
↓
Auto-sync
{/* Profile Updates Grid - More detailed */}
Profile Updates
{/* Career Stats Update */}
Career Stats
↑
WINS: 24 → 25
{/* Rating Update */}
Rating
+12
1342 → 1354
{/* Season Points Update */}
Season
+18
248 → 266 PTS
{/* Team Points Update */}
Team
+18
CONTRIBUTING
);
}