Skip to content

Commit 3914a00

Browse files
committed
fix: build error 원인 수정 (type 오류 수정)
1 parent 724b7c1 commit 3914a00

File tree

6 files changed

+23
-16
lines changed

6 files changed

+23
-16
lines changed

src/pages/Admin/components/ReportHandlingModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default function ReportHandlingModal({
2121
);
2222
};
2323

24-
const [reportRequest, setReportRequest] = useState<ReportRequest>({
24+
const [reportRequest, setReportRequest] = useState<PatchReportRequest>({
2525
status: 'RESOLVED',
2626
adminMemo: '',
2727
});

src/pages/LetterBoardDetail/index.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
getSharePostDetail,
77
postShareProposalApproval,
88
SharePost,
9-
postSharePostLike,
109
getSharePostLikeCount,
1110
} from '@/apis/share';
1211
import BlurImg from '@/assets/images/landing-blur.png';
@@ -87,7 +86,13 @@ const LetterBoardDetailPage = ({ confirmDisabled }: ShareLetterPreviewProps) =>
8786

8887
return (
8988
<>
90-
{activeReportModal && <ReportModal onClose={() => setActiveReportModal(false)} />}
89+
{activeReportModal && (
90+
<ReportModal
91+
onClose={() => setActiveReportModal(false)}
92+
reportType={'SHARE_POST'}
93+
letterId={null}
94+
/>
95+
)}
9196
<div className="grow bg-white">
9297
<Header
9398
likeCount={likeCount}

src/pages/MyPage/components/MyBoardPage.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useQuery } from '@tanstack/react-query';
22
import { useNavigate } from 'react-router';
33
import { twMerge } from 'tailwind-merge';
44

5-
import { getMySharePostList } from '@/apis/mypage';
5+
import { getMySharePostList } from '@/apis/myPage';
66
import BackgroundBottom from '@/components/BackgroundBottom';
77
import PageTitle from '@/components/PageTitle';
88

@@ -45,16 +45,18 @@ const MyBoardPage = () => {
4545
<p>loading</p>
4646
) : (
4747
<section className="mt-6 grid grid-cols-2 gap-x-5 gap-y-4">
48-
{postLists.map((item, index) => (
49-
<LetterPreview
50-
key={index}
51-
id={item.sharePostId}
52-
to={item.writerZipCode}
53-
from="12E21"
54-
content="저희가 주고 받은 행운의 편지 저희가 주고 받은 행운의 편지 저희가 주고 받은 행운의 편지
48+
{postLists.map(
49+
(item: { sharePostId: number; writerZipCode: string }, index: number) => (
50+
<LetterPreview
51+
key={index}
52+
id={item.sharePostId}
53+
to={item.writerZipCode}
54+
from="12E21"
55+
content="저희가 주고 받은 행운의 편지 저희가 주고 받은 행운의 편지 저희가 주고 받은 행운의 편지
5556
저희가 주고 받은 행운의 편지"
56-
/>
57-
))}
57+
/>
58+
),
59+
)}
5860
</section>
5961
)}
6062
</main>

src/pages/RandomLetters/components/MatchedLetter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const MatchedLetter = ({ matchedLetter }: { matchedLetter: MatchedLetter }) => {
1515

1616
return (
1717
<>
18-
{reportModalOpen && <ReportModal onClose={() => setReportModalOpen(false)} />}
18+
{reportModalOpen && <ReportModal onClose={() => setReportModalOpen(false)} reportType={'LETTER'} letterId={null} />}
1919
<div
2020
className={twMerge(
2121
`flex grow flex-col gap-3 px-5 pb-7.5`,

src/stores/myPageStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { create } from 'zustand';
22

3-
import { fetchMyPageInfo } from '@/apis/mypage';
3+
import { fetchMyPageInfo } from '@/apis/myPage';
44

55
interface MyPageDataStore {
66
zipCode: string;

src/types/admin.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
type Status = 'PENDING' | 'RESOLVED' | 'REJECTED';
2-
type ReportType = 'LETTER' | 'POST' | 'COMMENT';
2+
type ReportType = 'LETTER' | 'SHARE_POST' | 'COMMENT';
33
type Reason = 'ABUSE' | 'DEFAMATION' | 'HARASSMENT' | 'THREATS' | 'ETC';
44

55
interface ReportQueryString {

0 commit comments

Comments
 (0)