diff --git a/src/components/Gnb/Notification.tsx b/src/components/Gnb/Notification.tsx
index 163813f..2eeee72 100644
--- a/src/components/Gnb/Notification.tsx
+++ b/src/components/Gnb/Notification.tsx
@@ -146,25 +146,28 @@ export default function Notification({ closeModal }: { closeModal: () => void })
className={`max-h-[300px] overflow-y-auto ${notificationData.length >= 4 ? "h-[300px]" : ""}`}
>
- {notificationData.map((notification, index) => (
-
-
- handleRead(notification.id)}
- className={`cursor-pointer pt-4 ${notification.isRead ? "bg-[#f1f1f1]" : "bg-color-gray-50"}`}
- >
-
- {getNotificationMessage(notification.event, notification.payload)}
-
-
- {formatRelativeTime(notification.createdAt)}
-
+ {notificationData
+ .slice()
+ .reverse()
+ .map((notification, index) => (
+
+
- handleRead(notification.id)}
+ className={`cursor-pointer pt-4 ${notification.isRead ? "bg-[#f1f1f1]" : "bg-color-gray-50"}`}
+ >
+
+ {getNotificationMessage(notification.event, notification.payload)}
+
+
+ {formatRelativeTime(notification.createdAt)}
+
- {index < notificationData.length - 1 && (
-
- )}
-
-
- ))}
+ {index < notificationData.length - 1 && (
+
+ )}
+
+
+ ))}
)}
diff --git a/src/features/DetailMaker.tsx b/src/features/DetailMaker.tsx
index f090ad3..a4087c6 100644
--- a/src/features/DetailMaker.tsx
+++ b/src/features/DetailMaker.tsx
@@ -109,9 +109,7 @@ export default function RequestDetailDreamer() {
setIsRequestSuccessModalOpen(true);
},
onError: (error: any) => {
- if (error.message === "이미 지정 견적을 요청하셨습니다!") {
- alert(error.message);
- }
+ alert(error.message);
},
});
diff --git a/src/services/planService.ts b/src/services/planService.ts
index 2f96be6..2cba9fa 100644
--- a/src/services/planService.ts
+++ b/src/services/planService.ts
@@ -1,3 +1,4 @@
+import { BAD_REQUEST, CONFLICT } from "@/utils/errorStatus";
import { api } from "./api";
import { ServiceArea } from "@/utils/formatRegion";
@@ -128,8 +129,10 @@ const planService = {
const response = await api.post(`/plans/${planId}/assign`, { assigneeId });
return response;
} catch (error: any) {
- if (error.response && error.response.status === 409) {
+ if (error.response && error.response.status === CONFLICT) {
throw new Error("이미 지정 견적을 요청하셨습니다!");
+ } else if (error.response && error.response.status === BAD_REQUEST) {
+ throw new Error("Maker가 서비스하는 지역이 아닙니다.");
}
}
},