diff --git a/src/components/modals/ExerciseModal.tsx b/src/components/modals/ExerciseModal.tsx index f5bec3c..56feaac 100644 --- a/src/components/modals/ExerciseModal.tsx +++ b/src/components/modals/ExerciseModal.tsx @@ -599,6 +599,8 @@ const ExerciseModal: React.FC = ({ const hasPrevSequence = hasSequenceControls && sequenceIndex! > 0; const hasNextSequence = hasSequenceControls && sequenceIndex! < sequenceLength - 1; + const isLastSequence = hasSequenceControls && sequenceIndex === sequenceLength - 1; + const canFinishWorkout = isLastSequence && allSetsCompleted; const isExerciseSelected = (exercise: any) => { const key = getExerciseKey(exercise); @@ -2292,10 +2294,21 @@ const getExerciseDisplayName = React.useCallback( )} - 운동 끝내기 + + 운동 끝내기 + @@ -2796,10 +2809,21 @@ const getExerciseDisplayName = React.useCallback( - 운동 끝내기 + + 운동 끝내기 + @@ -3368,11 +3392,18 @@ const styles = StyleSheet.create({ borderRadius: 12, alignItems: "center", }, + endWorkoutBtnDisabled: { + backgroundColor: "#2a2a2a", + opacity: 0.5, + }, endWorkoutBtnText: { color: "#ffffff", fontSize: 16, fontWeight: "600", }, + endWorkoutBtnTextDisabled: { + color: "#888888", + }, instructionScroll: { maxHeight: 260, }, diff --git a/src/screens/exercise/ExerciseScreen.tsx b/src/screens/exercise/ExerciseScreen.tsx index ebd01f1..ddda9a9 100644 --- a/src/screens/exercise/ExerciseScreen.tsx +++ b/src/screens/exercise/ExerciseScreen.tsx @@ -605,12 +605,12 @@ const ExerciseScreen = ({ navigation }: any) => { typeof goalData.weeklyCalorieGoal === "number" && goalData.weeklyCalorieGoal > 0 ) { - parts.push(`${goalData.weeklyCalorieGoal}kcal`); + parts.push(`${goalData.weeklyCalorieGoal.toLocaleString()}kcal`); } if (parts.length === 0) { return "목표치가 아직 설정되지 않았습니다"; } - return `목표치 | ${parts.join(" · ")}`; + return `목표치 | ${parts.join(", ")}`; }, [goalData]); const trimmedCompletionTitle = completionSummaryTitle.trim(); diff --git a/src/screens/inbody/InBodyScreen.tsx b/src/screens/inbody/InBodyScreen.tsx index 046f1e2..1330fde 100644 --- a/src/screens/inbody/InBodyScreen.tsx +++ b/src/screens/inbody/InBodyScreen.tsx @@ -22,7 +22,6 @@ import { } from "../../utils/inbodyApi"; import AsyncStorage from "@react-native-async-storage/async-storage"; import { eventBus } from "../../utils/eventBus"; -import InbodyDateNavigator from "../../components/common/InbodyDateNavigator"; import InBodyCalendarModal from "../../components/common/InBodyCalendarModal"; import { ROUTES } from "../../constants/routes"; import { ACCESS_TOKEN_KEY } from "../../services/apiConfig"; @@ -1212,7 +1211,7 @@ const InBodyScreen = ({ navigation, route }: any) => { )} - {/* 날짜 네비게이터 */} + {/* 날짜 선택 바 (캘린더 버튼만) */} {inBodyData && selectedDate && ( { - {availableDates.length > 0 && ( - - - - )} )} diff --git a/src/screens/main/HomeScreen.tsx b/src/screens/main/HomeScreen.tsx index a88731f..22b5a93 100644 --- a/src/screens/main/HomeScreen.tsx +++ b/src/screens/main/HomeScreen.tsx @@ -649,6 +649,18 @@ const HomeScreen = ({ navigation }: any) => { }; }, []); + // 인바디 업데이트 이벤트 리스너 + useEffect(() => { + const unsubscribe = eventBus.on("inbodyUpdated", () => { + console.log("[HOME] 인바디 업데이트 이벤트 수신, 인바디 데이터 새로고침"); + loadInBodyData(); + }); + + return () => { + unsubscribe?.(); + }; + }, []); + const handleCalendarClick = () => { navigation.navigate("Calendar"); };