diff --git a/src/components/Home/About.tsx b/src/components/Home/About.tsx index d94b595..6acc040 100644 --- a/src/components/Home/About.tsx +++ b/src/components/Home/About.tsx @@ -3,6 +3,18 @@ import { useEffect, useState } from "react"; export default function About() { const [time, setTime] = useState(""); const [post, setPost] = useState({}); + const [age, setAge] = useState(0); + + useEffect(() => { + // Calculate age based on reference date (2010-11-08) + const referenceDate = new Date(2010, 10, 8); // November is 10 because months are 0-indexed + const currentDate = new Date(); + let calculatedAge = currentDate.getFullYear() - referenceDate.getFullYear(); + if (currentDate < new Date(currentDate.getFullYear(), referenceDate.getMonth(), referenceDate.getDate())) { + calculatedAge -= 1; + } + setAge(calculatedAge); + }, []); useEffect(() => { fetch("https://api.imnya.ng/rss", { @@ -28,22 +40,29 @@ export default function About() { }, 1); return () => clearInterval(interval); }, []); + return (

πŸ€” About

-
+

항상 μƒˆλ‘œμš΄ 것을 μ°Ύκ³ 

삢을 더 간단λͺ…λ£Œν•˜κ²Œ λ§Œλ“€κ³  μžˆλŠ”

-

학생 개발자 λ‚¨ν˜„μ„μž…λ‹ˆλ‹€.

+

학생 개발자 λ‚¨ν˜„μ„μž…λ‹ˆλ‹€.

+
+ +
+

{age}μ‚΄μ˜ μ–΄λ¦° λ‚˜μ΄μ§€λ§Œ

+

μ €λŠ” 항상 μ œκ°€ ν•  수 μžˆλŠ” 졜적의 μ½”λ“œλ₯Ό λͺ©ν‘œλ‘œ ν•˜λ©°

+

μ‚¬μš©μžμ˜ κ²½ν—˜μ„ μ€‘μ‹¬μ μœΌλ‘œ κ³ λ €ν•˜λ©°

+

μƒˆλ‘œμš΄ κΈ°μˆ μ— λŒ€ν•œ 관심이 λ†’μŠ΅λ‹ˆλ‹€.

+ +

In South Korea : {time}

+

졜근 λΈ”λ‘œκ·Έ 보기 : {post.title}

- -

In South Korea : {time}

-

졜근 λΈ”λ‘œκ·Έ 보기 : {post.title}

-
); -} \ No newline at end of file +} diff --git a/src/index.html b/src/index.html index bc3f212..bf3b4b7 100644 --- a/src/index.html +++ b/src/index.html @@ -4,7 +4,8 @@ - μ•”λƒ₯ | :two_hearts: + λ‚¨ν˜„μ„ | :two_hearts: +