diff --git a/src/components/mypage/AllergyPopup.tsx b/src/components/mypage/AllergyPopup.tsx index b60bed2..56d6c74 100644 --- a/src/components/mypage/AllergyPopup.tsx +++ b/src/components/mypage/AllergyPopup.tsx @@ -45,6 +45,16 @@ const AllergyPopup = (props: AllergyProps) => { const sortedAllergy = selectedAllergy.sort((a, b) => { const aIndex = allergiesData.findIndex((data) => data.Allergy === a); const bIndex = allergiesData.findIndex((data) => data.Allergy === b); + + // 숫자 형식으로 변환 + const aNumber = parseInt(a, 10); + const bNumber = parseInt(b, 10); + + // 숫자를 기준으로 비교 + if (!isNaN(aNumber) && !isNaN(bNumber)) { + return aNumber - bNumber; + } + return aIndex - bIndex; }); diff --git a/src/components/school/notification/TodayNotification.tsx b/src/components/school/notification/TodayNotification.tsx index 0129f52..66a9666 100644 --- a/src/components/school/notification/TodayNotification.tsx +++ b/src/components/school/notification/TodayNotification.tsx @@ -41,7 +41,7 @@ const TodayNotification = () => { 오늘의 알림장 {notiData[0] !== null ? (