diff --git a/src/components/notification/NotificationPage.jsx b/src/components/notification/NotificationPage.jsx
index 679f670b..5a056d04 100644
--- a/src/components/notification/NotificationPage.jsx
+++ b/src/components/notification/NotificationPage.jsx
@@ -1,4 +1,3 @@
-import React from 'react';
import { useNavigate } from 'react-router-dom';
import * as S from './NotificationPage.style';
@@ -6,34 +5,56 @@ import Book from '/images/Book_light.svg';
import Comment from '/images/comment_light.svg';
import Heart from '/images/signature/ClickedHeart.svg';
-const NotificationPage = ({ notification }) => {
+const NotificationPage = ({ notifications }) => {
const navigate = useNavigate();
+ console.log(notifications);
return (
- {notification?.map(list => (
-
- {list.type === 'LIKE' && (
+ {notifications?.map(notify =>
+ notify?.content?.type === 'SIGNATURE' ? (
+ notify?.content?.action === 'LIKE' ? (
navigate(`/signature/post/${list.itemId}`)}>
-
- {list.content}
+ onClick={() => navigate(`/signature/post/${notify?.itemId}`)}>
+
+
+
+ {notify?.content?.actionUserNickname}님이 회원님의 시그니처
+ {notify?.itemDesc && `(${notify?.itemDesc})`}에
+ 좋아요를 남겼습니다.
+
+
- )}
- {list.type === 'COMMENT' && (
-
-
- {list.content}
+ ) : (
+ navigate(`/signature/post/${notify?.itemId}`)}>
+
+
+
+ {notify?.content?.actionUserNickname}님이 회원님의 시그니처
+ {notify?.itemDesc && `(${notify?.itemDesc})`}에
+ 댓글을 남겼습니다.
+
+
- )}
- {list.type === 'INVITE' && (
-
-
- {list.content}
+ )
+ ) : (
+ notify?.content?.type === 'RULE' &&
+ notify?.content?.action === 'COMMENT' && (
+ navigate(`/mate/rule-check/${notify?.itemId}`)}>
+
+
+
+ {notify?.content?.actionUserNickname}님이 회원님의 규칙
+ {notify?.itemDesc && `(${notify?.itemDesc})`}에
+ 댓글을 남겼습니다.
+
+
- )}
-
- ))}
+ )
+ ),
+ )}
);
};
diff --git a/src/components/notification/NotificationPage.style.js b/src/components/notification/NotificationPage.style.js
index f9ad4b24..04f44923 100644
--- a/src/components/notification/NotificationPage.style.js
+++ b/src/components/notification/NotificationPage.style.js
@@ -15,7 +15,7 @@ const NotificationContainer = styled.div`
flex-direction: row;
align-items: center;
width: 95%;
- font-size: ${FONT_SIZE.LG};
+ font-size: ${FONT_SIZE.SM};
margin-bottom: 30px;
padding: 20px;
border-radius: 10px;
@@ -29,11 +29,20 @@ const NotificationContainer = styled.div`
font-size: ${FONT_SIZE.SM};
}
+ h3 {
+ color: ${theme.COLOR.MAIN.GREEN};
+ }
+
span {
color: ${theme.COLOR.MAIN.GREEN};
+ font-size: ${FONT_SIZE.h3};
}
`;
+const TextContainer = styled.div`
+ width: 100%;
+`;
+
const Img = styled.img`
width: 8%;
margin-right: 20px;
@@ -63,4 +72,12 @@ const Text = styled.div`
font-size: 23px;
`;
-export { Container, NotificationContainer, Img, BellContainer, Bell, Text };
+export {
+ Container,
+ NotificationContainer,
+ TextContainer,
+ Img,
+ BellContainer,
+ Bell,
+ Text,
+};
diff --git a/src/pages/notification/Notification.jsx b/src/pages/notification/Notification.jsx
index bb632cc5..3ce1f51e 100644
--- a/src/pages/notification/Notification.jsx
+++ b/src/pages/notification/Notification.jsx
@@ -5,14 +5,14 @@ import { useGetNotification } from '@/hooks/notification/useGetNotification';
const Notification = () => {
const { data, isPending, isError } = useGetNotification();
- const notification = data?.data?.data;
- console.log(notification);
+ const notifications = data?.data?.data;
+
return (
{isPending ? (
) : (
-
+
)}
);