diff --git a/src/app/page.tsx b/src/app/page.tsx
index 6fd9b4a..2a11060 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,18 +1,81 @@
import SpeedrunTable, { Speedrun } from "@/components/Table";
+import { timeAgo } from "@/lib/utils";
+
+interface NewsPreview {
+ title: string;
+ description: string;
+ author: string;
+ date: number;
+}
+
+function NewsPost({ post }: { post: NewsPreview }) {
+ return (
+
+
{post.title}
+
{post.description}
+
+
+
+
{post.author}
+
+ {timeAgo(post.date)}
+
+
+
+
+ );
+}
export default function Home() {
const users: Speedrun[] = [
- { rank: 1, name: 'Kleo', time: 63, problem: 'Two Sum', date: 1651600541000 },
+ {
+ rank: 1,
+ name: "Kleo",
+ time: 63,
+ problem: "Two Sum",
+ date: 1651600541000,
+ },
];
return (
<>
-
+
+
+
+
LATEST NEWS
+
+
+
+
+
+
+
>
);
diff --git a/src/components/Table.tsx b/src/components/Table.tsx
index 1383c47..b0f6796 100644
--- a/src/components/Table.tsx
+++ b/src/components/Table.tsx
@@ -1,6 +1,6 @@
-import { format, timeAgo } from '@/lib/utils';
-import { formatDate } from 'date-fns';
-import React from 'react';
+import { format, timeAgo } from "@/lib/utils";
+import { formatDate } from "date-fns";
+import React from "react";
export interface Speedrun {
rank: number;
@@ -20,11 +20,21 @@ const SpeedrunTable: React.FC
= ({ data }) => {
- | # |
- Player |
- Time |
- Date |
- Problem |
+
+ #
+ |
+
+ Player
+ |
+
+ Time
+ |
+
+ Date
+ |
+
+ Problem
+ |
@@ -34,9 +44,18 @@ const SpeedrunTable: React.FC = ({ data }) => {
className="hover:bg-[#1f1f1f] transition-colors border-b border-[#1e1e1e]"
>
{user.rank} |
- {user.name} |
- {format(user.time)} |
- {timeAgo(user.date)} |
+
+ {user.name}
+ |
+
+ {format(user.time)}
+ |
+
+ {timeAgo(user.date)}
+ |
{user.problem} |
))}