Skip to content

Commit b327566

Browse files
Merge pull request #169 from gnims-project/dev
Feat/ 모두읽음버튼 Design, API변경, 유저피드백 반영(프로필수정시 비활성화된 버튼 색상 변경) #100
2 parents 4fe1234 + 608f4a7 commit b327566

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

src/components/mypage/ProfileEdit.jsx

+9-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ const ProfileEdit = () => {
1313
const isImageSelected =
1414
imgRef.current && imgRef.current.files && imgRef.current.files.length > 0;
1515
const isDisabled = loading || !isImageSelected;
16+
let a;
17+
if (isDisabled) {
18+
a = "[#6F6F6F]";
19+
} else {
20+
a = "[#002C51]";
21+
}
22+
1623
//이미지 미리보기
1724
const imagePreview = () => {
1825
const reader = new FileReader();
@@ -113,14 +120,14 @@ const ProfileEdit = () => {
113120
</div>
114121
<div className="flex row">
115122
<button
116-
className="h-[50px] rounded w-1/2 bg-[#002C51] font-[700] text-[#ffff] mt-[24px]"
123+
className={`h-[50px] rounded w-1/2 bg-${a} font-[700] text-[#ffff] mt-[24px]`}
117124
onClick={editHandler}
118125
disabled={isDisabled}
119126
>
120127
수정 완료
121128
</button>
122129
<button
123-
className="h-[50px] rounded w-1/2 ml-[15px] bg-[#6F6F6F] font-[700] text-[#ffff] mt-[24px]"
130+
className="h-[50px] rounded w-1/2 ml-[15px] bg-[#002C51] font-[700] text-[#ffff] mt-[24px]"
124131
onClick={imgResetHandle}
125132
>
126133
기본 이미지로 변경

src/components/notification/NotificationsList.jsx

+7-6
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ const NotificationsList = () => {
1313
const [notification, setNotification] = useState([]);
1414

1515
const readAll = async () => {
16-
const promises = notification.map((noti) =>
17-
instance.get(`/notifications/${noti.id}`)
18-
);
19-
await Promise.all(promises);
16+
await instance.put("/notifications");
17+
// const promises = notification.map((noti) =>
18+
// instance.get(`/notifications/${noti.id}`)
19+
// );
20+
// await Promise.all(promises);
2021
// 여기서 responses 배열을 처리한다.
2122
window.location.reload();
2223
};
@@ -128,9 +129,9 @@ const NotificationsList = () => {
128129
<div className="flex flex-row-reverse">
129130
<div
130131
onClick={readAll}
131-
className=" text-[12px] font-extralight items-center w-[100px] flex h-[19px] justify-center rounded-[4px] text-black bg-[#E8E8E8] cursor-pointer"
132+
className=" text-[14px] font-extralight items-center w-[100px] flex h-[40px] justify-center rounded-[4px] text-[#002C51] cursor-pointer"
132133
>
133-
모두 읽음처리
134+
모두 읽음표시
134135
</div>
135136
</div>
136137
<div>

0 commit comments

Comments
 (0)