feat: 添加AI体态评估页面及相关功能
- 新增AI体态评估页面,包含训练内容和统计信息 - 在首页中添加AI体态评估的导航链接 - 更新package-lock.json,调整依赖项的dev标记 - 修改布局文件以支持新页面的导航
This commit is contained in:
@@ -4,6 +4,7 @@ import { ThemedText } from '@/components/ThemedText';
|
||||
import { ThemedView } from '@/components/ThemedView';
|
||||
import { WorkoutCard } from '@/components/WorkoutCard';
|
||||
import { getChineseGreeting } from '@/utils/date';
|
||||
import { useRouter } from 'expo-router';
|
||||
import React from 'react';
|
||||
import { SafeAreaView, ScrollView, StyleSheet, View } from 'react-native';
|
||||
|
||||
@@ -22,6 +23,7 @@ const workoutData = [
|
||||
];
|
||||
|
||||
export default function HomeScreen() {
|
||||
const router = useRouter();
|
||||
return (
|
||||
<SafeAreaView style={styles.safeArea}>
|
||||
<ThemedView style={styles.container}>
|
||||
@@ -51,7 +53,13 @@ export default function HomeScreen() {
|
||||
title={workout.title}
|
||||
duration={workout.duration}
|
||||
imageSource={workout.imageSource}
|
||||
onPress={() => console.log(`Pressed ${workout.title}`)}
|
||||
onPress={() => {
|
||||
if (workout.title === 'AI体态评估') {
|
||||
router.push('/ai-posture-assessment');
|
||||
} else {
|
||||
console.log(`Pressed ${workout.title}`);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</ScrollView>
|
||||
|
||||
Reference in New Issue
Block a user