feat: 更新标签页和新增统计页面
- 修改标签页的名称和图标,将“探索”改为“统计”,并更新相关逻辑 - 新增统计页面,展示用户健康数据和历史记录 - 优化首页布局,调整组件显示,提升用户体验 - 删除不再使用的代码,简化项目结构
This commit is contained in:
@@ -12,7 +12,6 @@ import { loadPlans } from '@/store/trainingPlanSlice';
|
||||
// Removed WorkoutCard import since we no longer use the horizontal carousel
|
||||
import { useAuthGuard } from '@/hooks/useAuthGuard';
|
||||
import { TrainingPlan } from '@/services/trainingPlanApi';
|
||||
import { getChineseGreeting } from '@/utils/date';
|
||||
import { useRouter } from 'expo-router';
|
||||
import React from 'react';
|
||||
import { Animated, Image, PanResponder, Pressable, SafeAreaView, ScrollView, StyleSheet, useWindowDimensions, View } from 'react-native';
|
||||
@@ -260,10 +259,10 @@ export default function HomeScreen() {
|
||||
</View>
|
||||
<ScrollView showsVerticalScrollIndicator={false}>
|
||||
{/* Header Section */}
|
||||
<View style={styles.header}>
|
||||
{/* <View style={styles.header}>
|
||||
<ThemedText style={styles.greeting}>{getChineseGreeting()}</ThemedText>
|
||||
<ThemedText style={styles.userName}>新学员,欢迎你</ThemedText>
|
||||
</View>
|
||||
<ThemedText style={styles.userName}></ThemedText>
|
||||
</View> */}
|
||||
|
||||
{/* Search Box */}
|
||||
<SearchBox placeholder="搜索" />
|
||||
@@ -274,16 +273,16 @@ export default function HomeScreen() {
|
||||
|
||||
<View style={styles.featureGrid}>
|
||||
|
||||
<Pressable
|
||||
<Pressable
|
||||
style={[styles.featureCard, styles.featureCardQuinary]}
|
||||
onPress={() => pushIfAuthedElseLogin('/workout/today')}
|
||||
>
|
||||
<View style={styles.featureIconWrapper}>
|
||||
<View style={styles.featureIconPlaceholder}>
|
||||
<Image
|
||||
source={require('@/assets/images/icons/iconWorkout.png')}
|
||||
style={styles.featureIconImage}
|
||||
/>
|
||||
<Image
|
||||
source={require('@/assets/images/icons/iconWorkout.png')}
|
||||
style={styles.featureIconImage}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
<ThemedText style={styles.featureTitle}>训练</ThemedText>
|
||||
@@ -308,17 +307,17 @@ export default function HomeScreen() {
|
||||
>
|
||||
<View style={styles.featureIconWrapper}>
|
||||
<View style={styles.featureIconPlaceholder}>
|
||||
<Image
|
||||
source={require('@/assets/images/icons/iconPlan.png')}
|
||||
style={styles.featureIconImage}
|
||||
/>
|
||||
<Image
|
||||
source={require('@/assets/images/icons/iconPlan.png')}
|
||||
style={styles.featureIconImage}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
<ThemedText style={styles.featureTitle}>计划</ThemedText>
|
||||
</Pressable>
|
||||
|
||||
|
||||
|
||||
|
||||
</View>
|
||||
</View>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user