diff --git a/app/firebase-messaging-sw.js/route.ts b/app/firebase-messaging-sw.js/route.ts
index 1c08b04..9d9f32f 100644
--- a/app/firebase-messaging-sw.js/route.ts
+++ b/app/firebase-messaging-sw.js/route.ts
@@ -28,13 +28,22 @@ const messaging = firebase.messaging();
messaging.onBackgroundMessage((payload) => {
console.log("[Service Worker] 백그라운드 메시지 수신:", payload);
- const notificationTitle = payload.notification?.title || "새 알림";
- const notificationOptions = {
- body: payload.notification?.body || "",
- icon: payload.notification?.icon || "/logo/logo.svg",
- };
-
- self.registration.showNotification(notificationTitle, notificationOptions);
+ // 1. 만약 payload.notification 필드가 존재한다면, FCM SDK가 백그라운드에서 자동으로 알림을 보여줍니다.
+ // 이 상황에서 수동으로 showNotification을 또 부르면 알림이 2개 뜨게 되므로 수동 팝업은 패스합니다!
+ if (payload.notification) {
+ console.log("[Service Worker] notification 필드 존재로 인한 자동 알림 완료. 수동 노출 생략.");
+ return;
+ }
+
+ // 2. 오직 payload.notification이 없고 payload.data만 있는 'Data-only Message' 형태일 때만 수동으로 띄웁니다.
+ if (payload.data) {
+ const notificationTitle = payload.data.title || "새 알림";
+ const notificationOptions = {
+ body: payload.data.body || payload.data.message || "",
+ icon: payload.data.icon || "/logo/logo.svg",
+ };
+ self.registration.showNotification(notificationTitle, notificationOptions);
+ }
});
`;
diff --git a/app/layout.tsx b/app/layout.tsx
index 59bc23a..3382155 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -7,6 +7,7 @@ import { QueryProvider } from "@/providers/query-provider";
// import { getInitialMaintenanceStatus } from "@/lib/status";
import FcmInitializer from "@/components/common/FcmInitializer";
import ChatSocketInitializer from "@/components/common/ChatSocketInitializer";
+import ToastContainer from "@/components/common/ToastContainer";
const pretendard = localFont({
src: "./fonts/PretendardVariable.woff2",
@@ -72,6 +73,7 @@ export default async function RootLayout({
+
{children}
{/* */}
diff --git a/app/login/_components/LoginForm.tsx b/app/login/_components/LoginForm.tsx
index d295078..4f729b2 100644
--- a/app/login/_components/LoginForm.tsx
+++ b/app/login/_components/LoginForm.tsx
@@ -58,9 +58,12 @@ export const LoginForm = () => {
-
+
alert("미지원 서비스입니다.")}
+ className="cursor-pointer"
+ >
이메일 찾기
-
+
|
비밀번호 변경
diff --git a/app/matching-list/_components/YesMatchingList.tsx b/app/matching-list/_components/YesMatchingList.tsx
index 5547951..077516b 100644
--- a/app/matching-list/_components/YesMatchingList.tsx
+++ b/app/matching-list/_components/YesMatchingList.tsx
@@ -44,13 +44,15 @@ const YesMatchingList = ({
// 검색 필터
if (searchQuery.trim()) {
const query = searchQuery.trim().toLowerCase();
+ const cleanQuery = query.replace("살", "").trim();
result = result.filter((item) => {
const p = item.partner;
+ const rawAge = p.age || (p.birthDate ? getAge(p.birthDate) : null);
return (
p.nickname.toLowerCase().includes(query) ||
p.mbti.toLowerCase().includes(query) ||
p.major.toLowerCase().includes(query) ||
- (p.birthDate && String(getAge(p.birthDate)).includes(query))
+ (rawAge !== null && String(rawAge).includes(cleanQuery))
);
});
}
diff --git a/app/matching-result/_components/ScreenMatchingResult.tsx b/app/matching-result/_components/ScreenMatchingResult.tsx
index 2ae2c3d..8ba93f4 100644
--- a/app/matching-result/_components/ScreenMatchingResult.tsx
+++ b/app/matching-result/_components/ScreenMatchingResult.tsx
@@ -57,7 +57,7 @@ const ScreenMatchingResult = () => {
return (
router.push("/main")}
+ onClick={() => router.push("/matching")}
text={
{displayedText}>;
}
+const formatMBTISelection = (mbti: string): string => {
+ const mbtiMap: Record = {
+ E: "외향형",
+ I: "내향형",
+ S: "감각형",
+ N: "직관형",
+ T: "사고형",
+ F: "감정형",
+ J: "판단형",
+ P: "인식형",
+ };
+ const chars = mbti.split("").filter(Boolean);
+ const labels = chars.map((c) => mbtiMap[c] || c);
+ if (labels.length === 2) {
+ return `${labels[0]}, 그리고 ${labels[1]}`;
+ }
+ return labels.join(", ");
+};
+
export default function ImportantOptionDrawer({
trigger,
onSelect,
@@ -224,7 +243,7 @@ export default function ImportantOptionDrawer({
) : (
-
+
{typingStep >= 1 && (
@@ -241,7 +260,11 @@ export default function ImportantOptionDrawer({
diff --git a/app/matching/_components/MatchingAgeOption.tsx b/app/matching/_components/MatchingAgeOption.tsx
index 85d6ed9..bdf5bb0 100644
--- a/app/matching/_components/MatchingAgeOption.tsx
+++ b/app/matching/_components/MatchingAgeOption.tsx
@@ -61,9 +61,14 @@ export default function MatchingAgeOption({
onConfirm={handleConfirm}
trigger={