From daeb5e4e469fc7352a113f4556674764f283cdb4 Mon Sep 17 00:00:00 2001 From: minseo23232 Date: Sun, 14 Dec 2025 13:28:20 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=EC=9D=B8=EB=B0=94=EB=94=94=20=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=20=EB=B0=94=20=EC=A4=91=EB=B3=B5=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/screens/inbody/InBodyScreen.tsx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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 && ( - - - - )} )} From bb97814a3bd50f1aa451fc5316cc94bdd31ca408 Mon Sep 17 00:00:00 2001 From: minseo23232 Date: Sun, 14 Dec 2025 15:50:17 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=EC=9A=B4=EB=8F=99=20=EC=A7=84=ED=96=89=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/modals/ExerciseModal.tsx | 39 ++++++++++++++++++++++--- src/screens/exercise/ExerciseScreen.tsx | 4 +-- src/screens/main/HomeScreen.tsx | 12 ++++++++ 3 files changed, 49 insertions(+), 6 deletions(-) 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/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"); };