Added a newsto the landing page

This commit is contained in:
2025-08-07 13:52:10 -05:00
parent aee75f8d26
commit be9b9d6ba3
2 changed files with 95 additions and 13 deletions
+30 -11
View File
@@ -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<TableProps> = ({ data }) => {
<table className="min-w-full text-sm text-[#e0e0e0]">
<thead>
<tr className="border-b border-[#2a2a2a]">
<th className="px-6 py-3 text-left font-medium tracking-wide text-[#aaaaaa] uppercase w-14">#</th>
<th className="px-6 py-3 text-left font-medium tracking-wide text-[#aaaaaa] uppercase w-52">Player</th>
<th className="px-6 py-3 text-left font-medium tracking-wide text-[#aaaaaa] uppercase w-52">Time</th>
<th className="px-6 py-3 text-left font-medium tracking-wide text-[#aaaaaa] uppercase w-52">Date</th>
<th className="px-6 py-3 text-left font-medium tracking-wide text-[#aaaaaa] uppercase">Problem</th>
<th className="px-6 py-3 text-left font-medium tracking-wide text-[#aaaaaa] uppercase w-14">
#
</th>
<th className="px-6 py-3 text-left font-medium tracking-wide text-[#aaaaaa] uppercase w-52">
Player
</th>
<th className="px-6 py-3 text-left font-medium tracking-wide text-[#aaaaaa] uppercase w-52">
Time
</th>
<th className="px-6 py-3 text-left font-medium tracking-wide text-[#aaaaaa] uppercase w-52">
Date
</th>
<th className="px-6 py-3 text-left font-medium tracking-wide text-[#aaaaaa] uppercase">
Problem
</th>
</tr>
</thead>
<tbody>
@@ -34,9 +44,18 @@ const SpeedrunTable: React.FC<TableProps> = ({ data }) => {
className="hover:bg-[#1f1f1f] transition-colors border-b border-[#1e1e1e]"
>
<td className="px-6 py-4 whitespace-nowrap">{user.rank}</td>
<td className="px-6 py-4 whitespace-nowrap">{user.name}</td>
<td className="px-6 py-4 whitespace-nowrap">{format(user.time)}</td>
<td className="px-6 py-4 whitespace-nowrap" title={new Date(user.date).toLocaleString()}>{timeAgo(user.date)}</td>
<td className="px-6 py-4 whitespace-nowrap font-bold">
{user.name}
</td>
<td className="px-6 py-4 whitespace-nowrap">
{format(user.time)}
</td>
<td
className="px-6 py-4 whitespace-nowrap"
title={new Date(user.date).toLocaleString()}
>
{timeAgo(user.date)}
</td>
<td className="px-6 py-4 whitespace-nowrap">{user.problem}</td>
</tr>
))}