import { PlanCard } from '@/components/PlanCard'; import { SearchBox } from '@/components/SearchBox'; import { ThemedText } from '@/components/ThemedText'; import { ThemedView } from '@/components/ThemedView'; import { WorkoutCard } from '@/components/WorkoutCard'; import { getChineseGreeting } from '@/utils/date'; import React from 'react'; import { SafeAreaView, ScrollView, StyleSheet, View } from 'react-native'; const workoutData = [ { id: 1, title: 'AI体态评估', duration: 5, imageSource: 'https://plates-1251306435.cos.ap-guangzhou.myqcloud.com/images/Imagettpg.png', }, { id: 2, title: '认证教练', imageSource: require('@/assets/images/react-logo.png'), } ]; export default function HomeScreen() { return ( {/* Header Section */} {getChineseGreeting()} 🔥 新学员,欢迎你 {/* Search Box */} {/* Popular Workouts Section */} 热门活动 {workoutData.map((workout) => ( console.log(`Pressed ${workout.title}`)} /> ))} {/* Today Plan Section */} 为你推荐 {/* Add some spacing at the bottom */} ); } const styles = StyleSheet.create({ safeArea: { flex: 1, backgroundColor: '#F7F8FA', }, container: { flex: 1, backgroundColor: '#F7F8FA', }, header: { paddingHorizontal: 24, paddingTop: 16, paddingBottom: 8, }, greeting: { fontSize: 16, color: '#8A8A8E', fontWeight: '400', marginBottom: 6, }, userName: { fontSize: 30, fontWeight: 'bold', color: '#1A1A1A', lineHeight: 36, }, sectionContainer: { marginTop: 24, }, sectionTitle: { fontSize: 24, fontWeight: 'bold', color: '#1A1A1A', paddingHorizontal: 24, marginBottom: 18, }, planList: { paddingHorizontal: 24, }, workoutScroll: { paddingLeft: 24, }, workoutScrollContainer: { paddingRight: 24, }, bottomSpacing: { height: 120, }, });