From a7dc110fb6491893eb1191b08140774862a42366 Mon Sep 17 00:00:00 2001 From: GSB0203 Date: Sat, 19 Jul 2025 15:27:04 +0900 Subject: [PATCH 01/14] =?UTF-8?q?fix=20::=20=EC=95=84=EC=9D=B4=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20=EB=B6=88=EA=B0=80=20=EC=98=A4=EB=A5=98=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/childList/edit-child/page.tsx | 353 ++++++++++-------------------- 1 file changed, 117 insertions(+), 236 deletions(-) diff --git a/app/childList/edit-child/page.tsx b/app/childList/edit-child/page.tsx index ffe3817..97edb6f 100644 --- a/app/childList/edit-child/page.tsx +++ b/app/childList/edit-child/page.tsx @@ -2,7 +2,6 @@ import { useState, useEffect, useRef } from "react" import { useRouter, useSearchParams } from "next/navigation" -import { motion, AnimatePresence } from "framer-motion" import Container from "../../components/Container" import Toast from "../../components/Toast" @@ -24,7 +23,6 @@ function EditChildPageContent() { const searchParams = useSearchParams(); const childId = searchParams.get('id'); - const [currentDisplayStep, setCurrentDisplayStep] = useState(1); const [name, setName] = useState(''); const [dob, setDob] = useState(''); const [gender, setGender] = useState(''); @@ -45,7 +43,6 @@ function EditChildPageContent() { const nameRef = useRef(null); const dobRef = useRef(null); const healthStatusRef = useRef(null); - const nameAdvanceTimeout = useRef(null); useEffect(() => { const fetchChildData = async () => { @@ -95,24 +92,6 @@ function EditChildPageContent() { fetchChildData(); }, [childId]); - useEffect(() => { - switch (currentDisplayStep) { - case 1: - nameRef.current?.focus(); - break; - case 2: - dobRef.current?.focus(); - break; - case 3: - break; - case 4: - healthStatusRef.current?.focus(); - break; - default: - break; - } - }, [currentDisplayStep]); - const showToast = (message: string, type: 'success' | 'error') => { setToast({ message, @@ -125,14 +104,6 @@ function EditChildPageContent() { setToast(prev => ({ ...prev, isVisible: false })); }; - const advanceStep = () => { - if (currentDisplayStep < 4) { - setCurrentDisplayStep(prevStep => prevStep + 1); - } else { - handleSave(); - } - }; - const handleSave = async () => { if (!childId) return; @@ -162,6 +133,7 @@ function EditChildPageContent() { } showToast('아이 정보가 성공적으로 수정되었습니다!', 'success'); + setIsSaving(false); // 성공 후 잠시 대기 후 페이지 이동 setTimeout(() => { @@ -170,40 +142,16 @@ function EditChildPageContent() { } catch (error) { console.error("수정 실패:", error); showToast('아이 정보 수정에 실패했습니다. 다시 시도해주세요.', 'error'); - } finally { setIsSaving(false); } }; - const handleKeyDown = (event: React.KeyboardEvent) => { - if (event.key === 'Enter') { - event.preventDefault(); - - if (currentDisplayStep === 1 && name.trim() === '') return; - if (currentDisplayStep === 2 && dob.trim() === '') return; - if (currentDisplayStep === 4 && healthStatus.trim() === '') return; - - advanceStep(); - } - }; - const handleGenderSelect = (selectedGender: string) => { setGender(selectedGender); - advanceStep(); }; const handleBack = () => { - if (currentDisplayStep === 1) { - router.push('/childList'); - } else { - setCurrentDisplayStep(prev => Math.max(1, prev - 1)); - } - }; - - const fadeInOutVariants = { - hidden: { opacity: 0, y: 10 }, - visible: { opacity: 1, y: 0, transition: { duration: 0.5 } }, - exit: { opacity: 0, y: -10, transition: { duration: 0.3 } }, + router.push('/childList'); }; if (isLoading) { @@ -281,193 +229,126 @@ function EditChildPageContent() {

아이의 정보를 수정해주세요

- - {currentDisplayStep >= 1 && ( - - -
- { - setName(e.target.value); - const koreanCharCount = e.target.value.match(/[\uAC00-\uD7A3]/g)?.length || 0; - if (nameAdvanceTimeout.current) { - clearTimeout(nameAdvanceTimeout.current); - } - if (currentDisplayStep === 1 && koreanCharCount === 3) { - nameAdvanceTimeout.current = setTimeout(() => { - advanceStep(); - }, 500); - } - }} - onKeyDown={handleKeyDown} - /> -
-
- )} -
- - - {currentDisplayStep >= 2 && ( - - -
- { - let value = e.target.value.replace(/[^0-9]/g, ''); - if (value.length > 8) value = value.slice(0, 8); - let formatted = value; - if (value.length > 4) { - formatted = value.slice(0, 4) + '-' + value.slice(4); - } - if (value.length > 6) { - formatted = value.slice(0, 4) + '-' + value.slice(4, 6) + '-' + value.slice(6); - } - setDob(formatted); - if (currentDisplayStep === 2 && value.length === 8) { - advanceStep(); - } - }} - onKeyDown={handleKeyDown} - /> -
-
- )} -
- - - {currentDisplayStep >= 3 && ( - - -
- - -
-
- )} -
- - - {currentDisplayStep >= 4 && ( - - -
- setHealthStatus(e.target.value)} - onKeyDown={handleKeyDown} - /> -
-
- )} -
- - {currentDisplayStep === 4 && ( - + +
+ { + setName(e.target.value); + }} + /> +
+ + +
+ +
+ { + let value = e.target.value.replace(/[^0-9]/g, ''); + if (value.length > 8) value = value.slice(0, 8); + let formatted = value; + if (value.length > 4) { + formatted = value.slice(0, 4) + '-' + value.slice(4); + } + if (value.length > 6) { + formatted = value.slice(0, 4) + '-' + value.slice(4, 6) + '-' + value.slice(6); + } + setDob(formatted); + }} + /> +
+
+ +
+ +
+ + +
+
+ +
+ +
+ setHealthStatus(e.target.value)} + onKeyDown={(e) => { + // 메모 단계에서는 엔터키 동작하지 않음 + if (e.key === 'Enter') { + e.preventDefault(); + } + }} + /> +
+

알레르기와 같은 참고해야할 사항이 있다면 적어주세요.

+
+ +
+ - - )} + {isSaving ? ( + <> +
+ 수정 중... + + ) : ( + '수정 완료' + )} + +
); } export default function EditChildPage() { - return ( -
-
-
-

로딩 중...

-
-
- ); + return ; } \ No newline at end of file From dca018ba01e49d0ca6d2bd5d9081dcc299e1708e Mon Sep 17 00:00:00 2001 From: GSB0203 Date: Sat, 19 Jul 2025 15:29:54 +0900 Subject: [PATCH 02/14] =?UTF-8?q?fix=20::=20=ED=86=B5=EA=B3=84=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=EC=97=90=EC=84=9C=20=EC=83=88=EB=A1=9C?= =?UTF-8?q?=EA=B3=A0=EC=B9=A8=EC=8B=9C=20=EC=98=A4=EB=A5=98=20=EC=95=8C?= =?UTF-8?q?=EB=9E=8C=EB=9C=A8=EB=8D=98=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/stats/page.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/stats/page.tsx b/app/stats/page.tsx index 5f3522b..f26cff5 100644 --- a/app/stats/page.tsx +++ b/app/stats/page.tsx @@ -52,7 +52,7 @@ ChartJS.register( export default function StatsPage() { const router = useRouter() - const { isChildMode, selectedChild, hasChildren, autoSelectFirstChild } = useChild(); + const { isChildMode, selectedChild, hasChildren, autoSelectFirstChild, isLoading: childContextLoading } = useChild(); const [childName, setChildName] = useState('') const [activeTab, setActiveTab] = useState('통계') const [statsUnit, setStatsUnit] = useState<'week' | 'month'>('week') @@ -158,10 +158,10 @@ export default function StatsPage() { }, [selectedChild, loading, autoSelectFirstChild]); useEffect(() => { - if (!hasChildren && !selectedChild) { + if (!childContextLoading && !hasChildren && !selectedChild) { showToast('이동할 수 없습니다. 아이를 생성하거나 연결해주세요.', 'warning'); } - }, [hasChildren, selectedChild]); + }, [hasChildren, selectedChild, childContextLoading]); const currentAccuracyData = dailyTemperatureData.map(d => d.avgTemp) const latestAccuracy = currentAccuracyData.length > 0 ? currentAccuracyData[currentAccuracyData.length - 1] : 0 From 30bd37f71b4532fd19a50493ffdff55c62cc08bb Mon Sep 17 00:00:00 2001 From: GSB0203 Date: Sat, 19 Jul 2025 15:31:41 +0900 Subject: [PATCH 03/14] =?UTF-8?q?fix=20::=20=EB=8B=AC=EB=A0=A5=20=EC=98=A4?= =?UTF-8?q?=EB=8A=98=20=EB=82=A0=EC=A7=9C=20=EC=A1=B4=EC=9E=AC=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C=20=EC=97=86=EB=8D=98=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/baby/page.tsx | 4 ++-- app/home/page.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/baby/page.tsx b/app/baby/page.tsx index 3c24e6c..ef1ad9e 100644 --- a/app/baby/page.tsx +++ b/app/baby/page.tsx @@ -259,7 +259,7 @@ export default function Present() { }; }; - // 현재 달의 과거 날짜들에 대한 데이터 미리 로드 + // 현재 달의 과거 날짜들과 오늘 날짜에 대한 데이터 미리 로드 useEffect(() => { if (selectedChild?.id && !isLoading) { const today = new Date(); @@ -269,7 +269,7 @@ export default function Present() { const lastDay = new Date(year, month + 1, 0); for (let date = new Date(firstDay); date <= lastDay; date.setDate(date.getDate() + 1)) { - if (isPastDate(date)) { + if (isPastDate(date) || isToday(date)) { const dateStr = formatDate(date); if (!forecastData[dateStr]) { loadForecastData(dateStr); diff --git a/app/home/page.tsx b/app/home/page.tsx index 0a279d7..35939c7 100644 --- a/app/home/page.tsx +++ b/app/home/page.tsx @@ -402,7 +402,7 @@ export default function Register() { } }, [isLoading, hasChildren, selectedChild]); - // 현재 달의 과거 날짜들에 대한 데이터 미리 로드 + // 현재 달의 과거 날짜들과 오늘 날짜에 대한 데이터 미리 로드 useEffect(() => { if (selectedChild?.id && !isLoading) { const today = new Date(); @@ -411,7 +411,7 @@ export default function Register() { const firstDay = new Date(year, month, 1); const lastDay = new Date(year, month + 1, 0); for (let date = new Date(firstDay); date <= lastDay; date.setDate(date.getDate() + 1)) { - if (isPastDate(date)) { + if (isPastDate(date) || isToday(date)) { const dateStr = formatDate(date); if (!forecastData[dateStr]) { loadForecastData(dateStr); From bbcaa2eb1ae984109e142e0c2ff0cb3b3927009b Mon Sep 17 00:00:00 2001 From: GSB0203 Date: Sat, 19 Jul 2025 15:40:09 +0900 Subject: [PATCH 04/14] =?UTF-8?q?feat=20::=20=EB=AA=A8=EB=93=A0=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=84=A4=EC=A0=95=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/childList/page.tsx | 11 ++++++++++- app/components/HeaderBar.tsx | 4 ++-- app/stats/page.tsx | 11 +++++++++-- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/app/childList/page.tsx b/app/childList/page.tsx index 720830d..7fc8d4f 100644 --- a/app/childList/page.tsx +++ b/app/childList/page.tsx @@ -4,6 +4,7 @@ import { useState, useEffect } from "react" import { useRouter } from "next/navigation" import Container from "../components/Container" import NavigationBar from "../components/NavigationBar" +import HeaderBar from "../components/HeaderBar" import Toast from "../components/Toast" import { useChild } from "../contexts/ChildContext" @@ -398,8 +399,16 @@ export default function ChildListPage() {
+ {/* 상단바 */} +
+ +
+
- 아이 관리

등록된 아이 목록

총 {childrenData.length}명의 아이가 등록되어 있습니다. diff --git a/app/components/HeaderBar.tsx b/app/components/HeaderBar.tsx index 68163b7..59ba213 100644 --- a/app/components/HeaderBar.tsx +++ b/app/components/HeaderBar.tsx @@ -50,7 +50,7 @@ export default function HeaderBar({ {showChildListButton && ( -

@@ -352,13 +343,6 @@ export default function ChildListPage() { if (error) { return ( -
- -
@@ -390,19 +374,14 @@ export default function ChildListPage() { onClose={hideToast} /> -
- -
+
{/* 상단바 */} -
+
From 46391e482627fe35f501567c95f5d05b3684fe9e Mon Sep 17 00:00:00 2001 From: GSB0203 Date: Sat, 19 Jul 2025 15:45:40 +0900 Subject: [PATCH 06/14] =?UTF-8?q?fix=20::=20=EC=84=A4=EC=A0=95=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EB=90=98=EB=8F=8C=EC=95=84=EA=B0=80=EB=A9=B4=20?= =?UTF-8?q?=EC=9B=90=EB=9E=98=20=ED=8E=98=EC=9D=B4=EC=A7=80=EB=A1=9C=20?= =?UTF-8?q?=EB=8F=8C=EC=95=84=EA=B0=80=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/HeaderBar.tsx | 3 ++- app/settings/page.tsx | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/app/components/HeaderBar.tsx b/app/components/HeaderBar.tsx index 59ba213..d5e2db3 100644 --- a/app/components/HeaderBar.tsx +++ b/app/components/HeaderBar.tsx @@ -34,7 +34,8 @@ export default function HeaderBar({ if (onSettingsClick) { onSettingsClick(); } else { - router.push('/settings'); + const currentPath = window.location.pathname; + router.push(`/settings?from=${encodeURIComponent(currentPath)}`); } }; diff --git a/app/settings/page.tsx b/app/settings/page.tsx index 6fea9f9..e907739 100644 --- a/app/settings/page.tsx +++ b/app/settings/page.tsx @@ -1,15 +1,17 @@ 'use client' -import React, { useState } from 'react'; -import { useRouter } from 'next/navigation'; +import React, { useState, useEffect } from 'react'; +import { useRouter, useSearchParams } from 'next/navigation'; import Container from '../components/Container'; import { useChild } from '../contexts/ChildContext'; import { clearAuthState } from '../auth/index'; export default function Settings() { const router = useRouter(); + const searchParams = useSearchParams(); const { isChildMode, selectedChild, exitChildMode, enterChildMode } = useChild(); const [isLoading, setIsLoading] = useState(false); + const [fromPage, setFromPage] = useState('/home'); const handleLogout = async () => { setIsLoading(true); @@ -55,8 +57,16 @@ export default function Settings() { } }; + // URL 쿼리 파라미터에서 원래 페이지 정보 가져오기 + useEffect(() => { + const from = searchParams.get('from'); + if (from) { + setFromPage(decodeURIComponent(from)); + } + }, [searchParams]); + const handleBackToHome = () => { - router.push('/home'); + router.push(fromPage); }; return ( From 66ab5db7be9a36f6bf47207fce2e555aedc0b0a5 Mon Sep 17 00:00:00 2001 From: GSB0203 Date: Sat, 19 Jul 2025 15:49:35 +0900 Subject: [PATCH 07/14] =?UTF-8?q?refactor=20::=20=EC=84=B8=ED=8C=85=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/baby/page.tsx | 11 ++--------- app/childList/page.tsx | 11 ++--------- app/components/HeaderBar.tsx | 4 ++-- app/components/PageHeader.tsx | 28 ++++++++++++++++++++++++++++ app/home/page.tsx | 11 ++--------- app/stats/page.tsx | 11 ++--------- 6 files changed, 38 insertions(+), 38 deletions(-) create mode 100644 app/components/PageHeader.tsx diff --git a/app/baby/page.tsx b/app/baby/page.tsx index ef1ad9e..e3712b1 100644 --- a/app/baby/page.tsx +++ b/app/baby/page.tsx @@ -16,7 +16,7 @@ import { EmotionTypeData } from "../utils/emotionUtils" import Calendar from "../components/Calendar" -import HeaderBar from "../components/HeaderBar" +import PageHeader from "../components/PageHeader" // 감정 타입 인터페이스 (공통 유틸리티 사용) type EmotionType = EmotionTypeData; @@ -293,14 +293,7 @@ export default function Present() {
{/* 상단바 */} -
- -
+ {/* 달력 컴포넌트 */} {/* 상단바 */} -
- -
+

등록된 아이 목록

diff --git a/app/components/HeaderBar.tsx b/app/components/HeaderBar.tsx index d5e2db3..26b891a 100644 --- a/app/components/HeaderBar.tsx +++ b/app/components/HeaderBar.tsx @@ -40,8 +40,8 @@ export default function HeaderBar({ }; return ( -
-
+
+
{childName} {inviteCode && ( diff --git a/app/components/PageHeader.tsx b/app/components/PageHeader.tsx new file mode 100644 index 0000000..f58a574 --- /dev/null +++ b/app/components/PageHeader.tsx @@ -0,0 +1,28 @@ +'use client' + +import React from 'react'; +import HeaderBar from './HeaderBar'; +import { useChild } from '../contexts/ChildContext'; + +interface PageHeaderProps { + customTitle?: string; + showChildListButton?: boolean; +} + +export default function PageHeader({ + customTitle, + showChildListButton = false +}: PageHeaderProps) { + const { selectedChild } = useChild(); + + return ( +
+ +
+ ); +} \ No newline at end of file diff --git a/app/home/page.tsx b/app/home/page.tsx index 35939c7..a84f307 100644 --- a/app/home/page.tsx +++ b/app/home/page.tsx @@ -14,7 +14,7 @@ import { isAuthenticated } from "../auth/index" import Calendar from "../components/Calendar" -import HeaderBar from "../components/HeaderBar" +import PageHeader from "../components/PageHeader" import { getEmotionColor, fetchEmotionType, EmotionTypeData } from "../utils/emotionUtils"; @@ -461,14 +461,7 @@ export default function Register() { />
{/* 상단바 */} -
- -
+ {/* 달력 컴포넌트 */}
{/* 상단바 */} -
- -
+ {/* 로딩 상태 */} {loading && ( From ed1aee89fd701b8713fd45995190a1abb6554104 Mon Sep 17 00:00:00 2001 From: GSB0203 Date: Sat, 19 Jul 2025 15:58:36 +0900 Subject: [PATCH 08/14] =?UTF-8?q?fix=20::=20=EA=B8=8D=EC=A0=95=20=EB=B6=80?= =?UTF-8?q?=EC=A0=95=20=EC=83=89=EC=83=81=20=EC=A0=95=EC=83=81=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/insert-after/page.tsx | 4 ++-- app/insert/page.tsx | 4 ++-- app/settings/page.tsx | 2 +- app/stats/page.tsx | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/insert-after/page.tsx b/app/insert-after/page.tsx index 6223a36..8bddea2 100644 --- a/app/insert-after/page.tsx +++ b/app/insert-after/page.tsx @@ -18,9 +18,9 @@ interface EmotionType { } const CATEGORY_COLORS = { - 긍정: '#3DC8EF', + 긍정: '#FF7B6F', 중립: '#FFD340', - 부정: '#FF7B6F' + 부정: '#3DC8EF' }; const TIME_PERIODS = { diff --git a/app/insert/page.tsx b/app/insert/page.tsx index 5232d21..22c5178 100644 --- a/app/insert/page.tsx +++ b/app/insert/page.tsx @@ -18,9 +18,9 @@ interface EmotionType { } const CATEGORY_COLORS = { - 긍정: '#3DC8EF', + 긍정: '#FF7B6F', 중립: '#FFD340', - 부정: '#FF7B6F' + 부정: '#3DC8EF' }; const TIME_PERIODS = { diff --git a/app/settings/page.tsx b/app/settings/page.tsx index e907739..7df24c2 100644 --- a/app/settings/page.tsx +++ b/app/settings/page.tsx @@ -105,7 +105,7 @@ export default function Settings() {
{isChildMode ? '아이' : '보호자'}
diff --git a/app/stats/page.tsx b/app/stats/page.tsx index 12123c0..b488e96 100644 --- a/app/stats/page.tsx +++ b/app/stats/page.tsx @@ -185,11 +185,11 @@ export default function StatsPage() { { data: [latestAccuracy, 100 - latestAccuracy], backgroundColor: [ - latestAccuracy >= 90 ? '#10B981' : latestAccuracy >= 70 ? '#3B82F6' : '#F59E0B', + latestAccuracy >= 90 ? '#FF7B6F' : latestAccuracy >= 70 ? '#3B82F6' : '#F59E0B', 'rgba(243, 244, 246, 0.3)' ], borderColor: [ - latestAccuracy >= 90 ? '#10B981' : latestAccuracy >= 70 ? '#3B82F6' : '#F59E0B', + latestAccuracy >= 90 ? '#FF7B6F' : latestAccuracy >= 70 ? '#3B82F6' : '#F59E0B', 'rgba(229, 231, 235, 0.5)' ], borderWidth: 0, From 99fbee65ea04d0ba3493c7806f5f4eb425fefa89 Mon Sep 17 00:00:00 2001 From: GSB0203 Date: Sat, 19 Jul 2025 16:09:20 +0900 Subject: [PATCH 09/14] =?UTF-8?q?fix=20::=20=EC=98=88=EB=B3=B4=20=EA=B8=B0?= =?UTF-8?q?=EB=A1=9D=20=EC=98=A4=EB=A5=98=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/insert-after/reason/page.tsx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/app/insert-after/reason/page.tsx b/app/insert-after/reason/page.tsx index 2bcdf30..b1bb5ab 100644 --- a/app/insert-after/reason/page.tsx +++ b/app/insert-after/reason/page.tsx @@ -79,7 +79,6 @@ function ReasonPageContent() { }; const handleNext = async () => { - if (reason.trim().length === 0) return; if (!currentEmotion || !selectedChild?.id || !forecastId) { setError('필수 정보가 누락되었습니다.'); return; @@ -167,7 +166,7 @@ function ReasonPageContent() { } }; - const isComplete = reason.trim().length > 0; + const isComplete = true; // 메모는 선택사항이므로 항상 true const fadeInOutVariants = { hidden: { opacity: 0, y: 10 }, @@ -236,8 +235,8 @@ function ReasonPageContent() { {reason.length}/500
-
- 🫶 자세히 적을수록 더 좋아요 +
+ 🫶 자세히 적을수록 더 좋아요 (선택사항)
@@ -250,15 +249,12 @@ function ReasonPageContent() { className="flex flex-col items-center w-full max-w-sm mt-auto mb-4" >
From da731f71a34625945bf9ce37631a3f96c2f7b5cb Mon Sep 17 00:00:00 2001 From: GSB0203 Date: Sat, 19 Jul 2025 16:35:18 +0900 Subject: [PATCH 10/14] =?UTF-8?q?fix=20::=20=ED=99=94=EB=A9=B4=20=EB=B9=84?= =?UTF-8?q?=EC=9C=A8=20=EB=B0=8F=20=EC=9E=98=EB=AA=BB=EB=90=9C=20=EA=B0=90?= =?UTF-8?q?=EC=A0=95=20=EC=A2=85=EB=A5=98=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/Container.tsx | 2 +- app/components/Toast.tsx | 14 ++-- app/globals.css | 3 + app/insert-after/reason/page.tsx | 108 ++++++++++++++++--------------- app/layout.tsx | 1 + app/utils/emotionUtils.ts | 12 ++-- 6 files changed, 72 insertions(+), 68 deletions(-) diff --git a/app/components/Container.tsx b/app/components/Container.tsx index 7e69c2f..f56d636 100644 --- a/app/components/Container.tsx +++ b/app/components/Container.tsx @@ -8,7 +8,7 @@ interface ContainerProps { export default function Container({ children, className = "" }: ContainerProps) { return (
-
+
{children}
diff --git a/app/components/Toast.tsx b/app/components/Toast.tsx index e80f1dc..03a29ab 100644 --- a/app/components/Toast.tsx +++ b/app/components/Toast.tsx @@ -25,30 +25,30 @@ export default function Toast({ message, type, isVisible, onClose }: ToastProps) const iconColor = type === 'success' ? 'bg-green-400' : type === 'error' ? 'bg-red-400' : 'bg-yellow-400'; return ( -
-
+
{type === 'success' ? ( - + ) : type === 'error' ? ( - + ) : ( - + )}
- {message} + {message} -
- -
-
- {searchParams.get('date') || new Date().toISOString().split('T')[0]} {TIME_PERIODS[currentStep].label} -
-
- {TIME_PERIODS[currentStep].text}{`\n`}느꼈나요? +
+
+
+
- {error && ( -
- {error} +
+
+ {searchParams.get('date') || new Date().toISOString().split('T')[0]} {TIME_PERIODS[currentStep].label}
- )} - -
-
-