Skip to content

Commit 34a80e7

Browse files
committed
fix: mailBox 배포 api에 따른 수정 작업
- sharePost 요청 요청자 id 삭제 - 상세 페이지 api 경로 수정 - 우편함 상세체이지 날짜 잘못표기하는 에러 수정
1 parent f0a803f commit 34a80e7

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/apis/mailBox.ts

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

1313
export const getMailboxDetail = async (id: number, pageParam: number) => {
1414
try {
15-
const response = await client.get(`/api/mailbox/${id}?page=${pageParam}&size=20`);
15+
const response = await client.get(`/api/mailbox/${id}/detail?page=${pageParam}&size=20`);
1616

1717
if (!response) throw new Error('error while fetching mailbox detail data');
1818
return response.data;

src/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ createRoot(document.getElementById('root')!).render(
2121
<App />
2222
</BrowserRouter>
2323
</QueryClientProvider>,
24-
// </StrictMode>,
24+
// </StrictMode>
2525
);

src/pages/LetterBoxDetail/components/LetterPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const LetterPreview = forwardRef<HTMLDivElement, LetterPreviewProps>((props, ref
6161

6262
return (
6363
<LetterWrapper isSender={isSend} onClick={() => handleItemClick(id)} ref={ref}>
64-
<p className="body-r text-gray-80 mb-3">{date}</p>
64+
<p className="body-r text-gray-80 mb-3">{formatDate(date)}</p>
6565
<p className="body-m text-gray-80 line-clamp-1 break-all">{title}</p>
6666
</LetterWrapper>
6767
);

src/pages/LetterBoxDetail/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const LetterBoxDetailPage = () => {
3535
useInfiniteQuery({
3636
queryKey: ['mailBoxDetail', userInfo.id],
3737
queryFn: async ({ pageParam }) => {
38-
console.log(`Fetching page: ${pageParam}`); // 디버깅용
38+
console.log(`Fetching page: ${pageParam}`);
3939
const response = await getMailboxDetail(userInfo.id, pageParam);
4040
console.log(response.data);
4141
return response.data;
@@ -73,7 +73,7 @@ const LetterBoxDetailPage = () => {
7373

7474
const shareMutation = useMutation({
7575
// Todo : useAuthStore -> myId 대체
76-
mutationFn: () => postShareProposals(selected, 1, userInfo.id, shareComment),
76+
mutationFn: () => postShareProposals(selected, userInfo.id, shareComment),
7777
onSuccess: () => {
7878
toggleShareMode();
7979
setShareComment('');

0 commit comments

Comments
 (0)