This commit is contained in:
암냥 2025-03-21 23:30:17 +09:00
commit 7a319ae268
No known key found for this signature in database
GPG key ID: C96C0327210DD61A
2 changed files with 28 additions and 8 deletions

View file

@ -3,6 +3,18 @@ import { useEffect, useState } from "react";
export default function About() {
const [time, setTime] = useState<string>("");
const [post, setPost] = useState<any>({});
const [age, setAge] = useState<number>(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 (
<div className="w-full h-screen flex flex-col items-center justify-center">
<div className="w-full md:w-[50%] p-4">
<h1 className="text-2xl font-bold">🤔 About</h1>
<div className="flex items-start justify-center flex-col p-2 mt-2 w-full">
<div className="flex flex-col font-regular text-xl">
<div className="flex flex-col font-light text-2xl">
<h1> <strong className="font-black"> </strong> </h1>
<h1> <strong className="font-black"></strong> </h1>
<h1> .</h1>
<h1> <strong className="font-black"></strong>.</h1>
</div>
<div className="mt-8">
<p>{age} </p>
<p> </p>
<p> </p>
<p> .</p>
<h1 className="mt-4 text-foreground">In South Korea : <span className="tnum text-muted-foreground">{time}</span></h1>
<h1 className="text-foreground"> : <a href={post.link} className="text-muted-foreground">{post.title}</a></h1>
</div>
<h1 className="mt-4">In South Korea : <span className="tnum">{time}</span></h1>
<h1> : <a href={post.link}>{post.title}</a></h1>
</div>
</div>
</div>
);
}
}