From c01f649713837feeddece93992c181bb8a578732 Mon Sep 17 00:00:00 2001 From: Taew00k Date: Sat, 25 Jan 2025 04:05:58 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=83=AD=EB=B0=94=20=EC=8A=A4=ED=81=AC?= =?UTF-8?q?=EB=A1=A4=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/tapBar/TapBar.tsx | 2 +- src/components/templeDetail/naverMap/smallMap/SmallMap.tsx | 2 +- src/components/templeDetail/templeInfo/templeInfo.tsx | 2 +- src/components/templeDetail/templePrice/TemplePrice.tsx | 2 +- src/components/templeDetail/templeReview/TempleReview.tsx | 2 +- .../templeDetail/templeSchedule/TempleSchedule.tsx | 2 +- src/hooks/useMoveScroll.ts | 5 +---- 7 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/components/common/tapBar/TapBar.tsx b/src/components/common/tapBar/TapBar.tsx index 50818597..f65f46e0 100644 --- a/src/components/common/tapBar/TapBar.tsx +++ b/src/components/common/tapBar/TapBar.tsx @@ -39,7 +39,7 @@ const TapBar = ({ type, selectedTap }: TapBarProps) => { }, []); return ( -
+
{taplist.map((label, index) => ( { ); return ( -
+
diff --git a/src/components/templeDetail/templeInfo/templeInfo.tsx b/src/components/templeDetail/templeInfo/templeInfo.tsx index 8c73ad8d..e964ee98 100644 --- a/src/components/templeDetail/templeInfo/templeInfo.tsx +++ b/src/components/templeDetail/templeInfo/templeInfo.tsx @@ -22,7 +22,7 @@ const TempleInfo = ({ introduction }: TempleInfoProps) => { } return ( -
+
{parsedIntroduction ? (
diff --git a/src/components/templeDetail/templePrice/TemplePrice.tsx b/src/components/templeDetail/templePrice/TemplePrice.tsx index b8d9d552..cac8d174 100644 --- a/src/components/templeDetail/templePrice/TemplePrice.tsx +++ b/src/components/templeDetail/templePrice/TemplePrice.tsx @@ -7,7 +7,7 @@ interface TemplePriceProps { const TemplePrice = ({ templestayPrice }: TemplePriceProps) => { return ( -
+
{templestayPrice ? (
diff --git a/src/components/templeDetail/templeReview/TempleReview.tsx b/src/components/templeDetail/templeReview/TempleReview.tsx index c347e205..acf1dedc 100644 --- a/src/components/templeDetail/templeReview/TempleReview.tsx +++ b/src/components/templeDetail/templeReview/TempleReview.tsx @@ -31,7 +31,7 @@ const TempleReview = () => { } return ( -
+
{ } return ( -
+
{parsedSchedule ? ( Object.entries(parsedSchedule).map(([day, programs]) => ( diff --git a/src/hooks/useMoveScroll.ts b/src/hooks/useMoveScroll.ts index 2147f85c..948c13a4 100644 --- a/src/hooks/useMoveScroll.ts +++ b/src/hooks/useMoveScroll.ts @@ -6,10 +6,7 @@ const useMoveScroll = (type: string, headerHeight: number = 0) => { const targetElement = document.getElementById(sectionIds[activeIndex]); if (targetElement) { - const elementPosition = - type === 'detail' - ? targetElement.getBoundingClientRect().bottom - : targetElement.getBoundingClientRect().top; // 요소의 현재 화면 내 위치 + const elementPosition = targetElement.getBoundingClientRect().top; const offsetPosition = window.scrollY + elementPosition - headerHeight; // 동일한 위치 계산 window.scrollTo({