diff --git a/app/(tabs)/_layout.tsx b/app/(tabs)/_layout.tsx index b19e314..16ad7b8 100644 --- a/app/(tabs)/_layout.tsx +++ b/app/(tabs)/_layout.tsx @@ -19,7 +19,7 @@ export default function TabLayout() { const routeName = route.name; const isSelected = (routeName === 'index' && pathname === '/') || (routeName === 'coach' && pathname === '/coach') || - (routeName === 'explore' && pathname === '/explore') || + (routeName === 'statistics' && pathname === '/statistics') || pathname.includes(routeName); return { @@ -42,8 +42,8 @@ export default function TabLayout() { return { icon: 'house.fill', title: '首页' } as const; case 'coach': return { icon: 'person.3.fill', title: 'Bot' } as const; - case 'explore': - return { icon: 'paperplane.fill', title: '探索' } as const; + case 'statistics': + return { icon: 'chart.pie.fill', title: '统计' } as const; case 'personal': return { icon: 'person.fill', title: '个人' } as const; default: @@ -125,34 +125,7 @@ export default function TabLayout() { tabBarShowLabel: false, }; }}> - { - const isHomeSelected = pathname === '/' || pathname === '/index'; - return ( - - - {isHomeSelected && ( - - 首页 - - )} - - ); - }, - }} - /> + { - const isExploreSelected = pathname === '/explore'; + const isHomeSelected = pathname === '/' || pathname === '/index'; return ( - - {isExploreSelected && ( + + {isHomeSelected && ( - 探索 + 首页 + + )} + + ); + }, + }} + /> + { + const isStatisticsSelected = pathname === '/statistics'; + return ( + + + {isStatisticsSelected && ( + + 统计 )} diff --git a/app/(tabs)/index.tsx b/app/(tabs)/index.tsx index ac2c483..6e89f42 100644 --- a/app/(tabs)/index.tsx +++ b/app/(tabs)/index.tsx @@ -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() { {/* Header Section */} - + {/* {getChineseGreeting()} - 新学员,欢迎你 - + + */} {/* Search Box */} @@ -274,16 +273,16 @@ export default function HomeScreen() { - pushIfAuthedElseLogin('/workout/today')} > - + 训练 @@ -308,17 +307,17 @@ export default function HomeScreen() { > - + 计划 - + diff --git a/app/(tabs)/explore.tsx b/app/(tabs)/statistics.tsx similarity index 100% rename from app/(tabs)/explore.tsx rename to app/(tabs)/statistics.tsx