Skip to content

Commit 74c30f7

Browse files
committed
fix: 마이페이지 api 수정
1 parent c222cb6 commit 74c30f7

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/apis/myPage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const fetchMyPageInfo = async () => {
1212

1313
export const getMySharePostList = async () => {
1414
try {
15-
const response = await client.get('/api/share-proposals/inbox');
15+
const response = await client.get('/api/share-posts/me');
1616
if (!response) throw new Error('error while fetching my share post list');
1717
return response.data;
1818
} catch (error) {

src/pages/MyPage/components/MyBoardPage.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const MyBoardPage = () => {
1616
const response = await getMySharePostList();
1717
if (!response) throw new Error('게시글 목록을 불러오는데 실패했습니다.');
1818
console.log(response);
19-
return response.data;
19+
return response.data as SharePost[];
2020
} catch (e) {
2121
console.error(e);
2222
}
@@ -49,10 +49,9 @@ const MyBoardPage = () => {
4949
<LetterPreview
5050
key={index}
5151
id={item.sharePostId}
52-
to={item.writerZipCode}
53-
from="12E21"
54-
content="저희가 주고 받은 행운의 편지 저희가 주고 받은 행운의 편지 저희가 주고 받은 행운의 편지
55-
저희가 주고 받은 행운의 편지"
52+
to={item.receiverZipCode}
53+
from={item.writerZipCode}
54+
content={item.content}
5655
/>
5756
))}
5857
</section>

0 commit comments

Comments
 (0)