From ef35b6b89bd6bf755f88ded76f5400d5bc8538a0 Mon Sep 17 00:00:00 2001 From: GitHub Ace Date: Fri, 17 Oct 2025 16:47:12 +0000 Subject: [PATCH] feat: extend story history from 3 to 6 months Co-authored-by: nextocat --- src/App.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 77b045d..3c4c477 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -32,12 +32,12 @@ function App() { setLoading(true) setError(null) - // Calculate timestamp for three months ago - const threeMonthsAgo = Math.floor(Date.now() / 1000) - (90 * 24 * 60 * 60) + // Calculate timestamp for six months ago + const sixMonthsAgo = Math.floor(Date.now() / 1000) - (180 * 24 * 60 * 60) - // Fetch top stories from last three months using Algolia + // Fetch top stories from last six months using Algolia const response = await fetch( - `https://hn.algolia.com/api/v1/search?tags=story&numericFilters=created_at_i>${threeMonthsAgo}&hitsPerPage=30` + `https://hn.algolia.com/api/v1/search?tags=story&numericFilters=created_at_i>${sixMonthsAgo}&hitsPerPage=30` ) if (!response.ok) throw new Error('Failed to fetch stories') @@ -117,7 +117,7 @@ function App() { Calm HN

- Top stories from the last three months + Top stories from the last six months