feat: 更新多个组件以优化用户体验和功能
- 在 CoachScreen 中移除不必要的 router 引入,简化代码结构 - 在 PersonalScreen 中移除未使用的 colorScheme 引入,优化组件性能 - 更新 NutritionRadarCard 组件,新增卡路里计算功能,提升营养数据展示 - 修改 Statistics 组件,调整样式以增强视觉效果 - 移除 iOS 项目中的多余健康数据权限设置,简化配置
This commit is contained in:
@@ -2,7 +2,7 @@ import { Ionicons } from '@expo/vector-icons';
|
||||
import { BlurView } from 'expo-blur';
|
||||
import * as Haptics from 'expo-haptics';
|
||||
import * as ImagePicker from 'expo-image-picker';
|
||||
import { useLocalSearchParams, useRouter } from 'expo-router';
|
||||
import { useLocalSearchParams } from 'expo-router';
|
||||
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import {
|
||||
ActivityIndicator,
|
||||
@@ -115,10 +115,8 @@ const CardType = {
|
||||
|
||||
type CardType = typeof CardType[keyof typeof CardType];
|
||||
|
||||
// const COACH_AVATAR = require('@/assets/images/logo.png');
|
||||
|
||||
export default function CoachScreen() {
|
||||
const router = useRouter();
|
||||
const params = useLocalSearchParams<{ name?: string }>();
|
||||
const insets = useSafeAreaInsets();
|
||||
|
||||
@@ -290,10 +288,10 @@ export default function CoachScreen() {
|
||||
if (Platform.OS === 'ios') {
|
||||
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
|
||||
}
|
||||
router.push('/mood/calendar');
|
||||
pushIfAuthedElseLogin('/mood/calendar');
|
||||
}
|
||||
},
|
||||
], [router, planDraft, checkin]);
|
||||
], [planDraft, checkin]);
|
||||
|
||||
const scrollToEnd = useCallback(() => {
|
||||
requestAnimationFrame(() => {
|
||||
|
||||
Reference in New Issue
Block a user