diff --git a/src/components/pdf/SurveySaleDownloadPdf.tsx b/src/components/pdf/SurveySaleDownloadPdf.tsx index 4002d49..b987f04 100644 --- a/src/components/pdf/SurveySaleDownloadPdf.tsx +++ b/src/components/pdf/SurveySaleDownloadPdf.tsx @@ -18,13 +18,13 @@ export default function SurveySaleDownloadPdf() { const isGeneratedRef = useRef(false) useEffect(() => { - setIsShow(true) if (isLoadingSurveyDetail || !surveyDetail || isGeneratedRef.current) return isGeneratedRef.current = true handleDownPdf() }, [surveyDetail?.id, isLoadingSurveyDetail]) const handleDownPdf = () => { + setIsShow(true) const options = { method: 'open' as const, resolution: Resolution.HIGH, @@ -330,7 +330,11 @@ export default function SurveySaleDownloadPdf() { boxSizing: 'border-box', }} > - {surveyDetail?.detailInfo?.constructionYear === '1' ? '新築' : `既築 (${surveyDetail?.detailInfo?.constructionYear}年)`} + {surveyDetail?.detailInfo?.constructionYear === '1' + ? '新築' + : surveyDetail?.detailInfo?.constructionYearEtc + ? `既築 (${surveyDetail?.detailInfo?.constructionYear}年)` + : '-'}