From d7c771753fa1a3c26853f072d4d23b61cf01dd55 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Wed, 30 Sep 2026 12:55:32 +0100 Subject: [PATCH 1/2] Set refresh() timestamp on initial render --- app/components/GithubActionsScheduledJobs.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/components/GithubActionsScheduledJobs.tsx b/app/components/GithubActionsScheduledJobs.tsx index 36a05ce..30b0546 100644 --- a/app/components/GithubActionsScheduledJobs.tsx +++ b/app/components/GithubActionsScheduledJobs.tsx @@ -18,7 +18,11 @@ function GithubActionsJob({ setSrc(imageUrl + "?refresh=" + Date.now()); }, 60000); return () => clearInterval(interval); - }); + }, []); + + useEffect(() => { + setSrc(imageUrl + "?refresh=" + Date.now()); + }, []); return (
From 1d6a854b8e544c4bb7b4ef8e5ecb7bde1fb7bf2a Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Wed, 30 Sep 2026 13:44:24 +0100 Subject: [PATCH 2/2] sure --- app/components/GithubActionsScheduledJobs.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/components/GithubActionsScheduledJobs.tsx b/app/components/GithubActionsScheduledJobs.tsx index 30b0546..e0a619c 100644 --- a/app/components/GithubActionsScheduledJobs.tsx +++ b/app/components/GithubActionsScheduledJobs.tsx @@ -14,16 +14,13 @@ function GithubActionsJob({ // Update the badges every 60 seconds by adding the date as a query parameter. const [src, setSrc] = useState(imageUrl); useEffect(() => { + setSrc(imageUrl + "?refresh=" + Date.now()); const interval = setInterval(() => { setSrc(imageUrl + "?refresh=" + Date.now()); }, 60000); return () => clearInterval(interval); }, []); - useEffect(() => { - setSrc(imageUrl + "?refresh=" + Date.now()); - }, []); - return (