Skip to content

Commit 2953e0e

Browse files
authored
fix : Clarify leaderboard update timing and fix timestamp handling (#198)
1 parent dad4723 commit 2953e0e

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

.github/workflows/leaderboard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Generate Leaderboard
22

33
on:
44
schedule:
5-
- cron: "0 */24 * * *" # every 6 hours
5+
- cron: "0 0 * * *" # every day at 00:00 UTC
66
workflow_dispatch:
77

88
concurrency:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ types/
148148

149149
The leaderboard is updated automatically using **GitHub Actions**.
150150

151-
- Runs every **6 hours**
151+
- Runs every **24 hours**
152152
- Can be triggered manually
153153

154154
---

components/footer.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ import CopyEmailButton from "./copy-email-button";
1515

1616
import { Config } from "@/types/config";
1717

18-
import { getUpdatedTime } from "@/lib/db";
19-
import { formatTimeAgo } from "@/lib/utils";
18+
/*import { getUpdatedTime } from "@/lib/db";
19+
import { formatTimeAgo } from "@/lib/utils";*/
2020

2121
interface FooterProps {
2222
config: Config;
2323
}
2424

2525
export const Footer = async ({ config }: FooterProps) => {
2626
const currentYear = new Date().getFullYear();
27-
const updatedAt = await getUpdatedTime();
27+
//const updatedAt = await getUpdatedTime();
2828

2929
return (
3030
<footer className="border-t border-zinc-200 dark:border-zinc-800 bg-zinc-50 dark:bg-black transition-colors mt-5">
@@ -244,13 +244,18 @@ export const Footer = async ({ config }: FooterProps) => {
244244
</div>
245245
</div>
246246

247-
<div className="border-t border-zinc-100 dark:border-zinc-800 pt-3">
247+
{/*<div className="border-t border-zinc-100 dark:border-zinc-800 pt-3">
248248
<p className="text-xs text-zinc-400 dark:text-zinc-500">
249249
Data last updated{" "}
250250
<span className="text-zinc-600 dark:text-zinc-300 font-medium">
251251
{updatedAt && formatTimeAgo(updatedAt)}
252252
</span>
253253
</p>
254+
</div>*/}
255+
<div className="border-t border-zinc-100 dark:border-zinc-800 pt-3">
256+
<p className="text-xs text-zinc-400 dark:text-zinc-500">
257+
Updated daily
258+
</p>
254259
</div>
255260
</div>
256261

0 commit comments

Comments
 (0)