Skip to content

Commit be5fb4a

Browse files
committed
deploy : 오류 수정
1 parent f5bbd84 commit be5fb4a

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/pages/Home/components/ShowShareAccessModal.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useEffect, useState } from 'react';
2-
import { useNavigate } from 'react-router';
2+
// import { useNavigate } from 'react-router';
33

4-
import { getSharePostDetail } from '@/apis/share';
4+
// import { getSharePostDetail } from '@/apis/share';
55
import { getShareProposalList } from '@/apis/share';
66
import { ShareProposal } from '@/apis/share';
77

@@ -14,7 +14,7 @@ interface ShowShareAccessModalProps {
1414
}
1515

1616
const ShowShareAccessModal = ({ onClose }: ShowShareAccessModalProps) => {
17-
const navigate = useNavigate();
17+
// const navigate = useNavigate();
1818

1919
const [shareProposals, setShareProposals] = useState<ShareProposal[]>([]);
2020

@@ -28,16 +28,16 @@ const ShowShareAccessModal = ({ onClose }: ShowShareAccessModalProps) => {
2828
});
2929
}, []);
3030

31-
const handleNavigation = async (shareProposalId: number) => {
32-
try {
33-
const postDetail = await getSharePostDetail(shareProposalId);
34-
navigate(`/board/letter/${shareProposalId}`, {
35-
state: { postDetail, isShareLetterPreview: true },
36-
});
37-
} catch (error) {
38-
console.error('❌ 게시글 상세 페이지로 이동하는 데에 실패했습니다.', error);
39-
}
40-
};
31+
// const handleNavigation = async (shareProposalId: number) => {
32+
// try {
33+
// const postDetail = await getSharePostDetail(shareProposalId);
34+
// navigate(`/board/letter/${shareProposalId}`, {
35+
// state: { postDetail, isShareLetterPreview: true },
36+
// });
37+
// } catch (error) {
38+
// console.error('❌ 게시글 상세 페이지로 이동하는 데에 실패했습니다.', error);
39+
// }
40+
// };
4141

4242
return (
4343
<ModalOverlay closeOnOutsideClick onClose={onClose}>
@@ -60,7 +60,7 @@ const ShowShareAccessModal = ({ onClose }: ShowShareAccessModalProps) => {
6060
<button
6161
className="text-gray-80 body-m flex h-10 w-full items-center justify-between gap-1 rounded-lg bg-white p-3"
6262
key={proposal.shareProposalId}
63-
onClick={() => handleNavigation(proposal.shareProposalId)}
63+
// onClick={() => handleNavigation(proposal.shareProposalId)}
6464
>
6565
<p>{proposal.requesterZipCode}님의 공유 요청</p>
6666
</button>

src/pages/LetterBoardDetail/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ const LetterBoardDetailPage = ({ confirmDisabled }: ShareLetterPreviewProps) =>
2525
const [isLike, setIsLike] = useState(false);
2626
const isWriter = false;
2727
const [activeReportModal, setActiveReportModal] = useState(false);
28+
const location = useLocation();
2829
const sharePostId: string = location.pathname.split('/')[3];
29-
// const location = useLocation();
3030
const navigate = useNavigate();
3131
// const isShareLetterPreview = location.state?.isShareLetterPreview || false;
3232
const isShareLetterPreview = false;

0 commit comments

Comments
 (0)