diff --git a/src/app/page.tsx b/src/app/page.tsx index d87afaf..38cbeec 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -8,6 +8,21 @@ export function Page() { const [age, setAge] = useState(0); const [post, setPost] = useState({}); + useEffect(() => { + const scrollToHash = () => { + const hash = window.location.hash.substring(1); + if (hash) { + const element = document.getElementById(hash); + if (element) { + setTimeout(() => { + element.scrollIntoView({ behavior: "smooth" }); + }, 100); + } + } + }; + scrollToHash(); + }, []); + useEffect(() => { // 나이 계산 const referenceDate = new Date(2010, 10, 8); // 2010년 11월 8일 (0-indexed) diff --git a/src/components/TimeLine.tsx b/src/components/TimeLine.tsx index beaca35..ff0dbec 100644 --- a/src/components/TimeLine.tsx +++ b/src/components/TimeLine.tsx @@ -176,7 +176,7 @@ export default function Timeline() { }, [isVisible, count]); return ( -
+

🌠 수상 및 교육

현재까지 {count}개의 개성있는 조각들이 모였어요!