From dc92d9b428a06578a330e1a351998af2bd5b0e2c Mon Sep 17 00:00:00 2001
From: Bram Suurd <78373894+BramSuurdje@users.noreply.github.com>
Date: Tue, 4 Jun 2024 21:03:57 +0200
Subject: [PATCH] Update cache expiry time to 24 hours in page.tsx. Changed
styling of script to be more uniform.
---
app/scripts/page.tsx | 2 +-
components/CacheControls.tsx | 53 ++++++++++++++++++------------------
components/Navbar.tsx | 6 ++--
components/Script.tsx | 21 +++++++-------
components/ui/button.tsx | 1 +
5 files changed, 44 insertions(+), 39 deletions(-)
diff --git a/app/scripts/page.tsx b/app/scripts/page.tsx
index 6685923..45fa5de 100644
--- a/app/scripts/page.tsx
+++ b/app/scripts/page.tsx
@@ -30,7 +30,7 @@ export default function Page() {
if (diffInMinutes < 30) {
setLinks(JSON.parse(cachedLinks));
- setCacheExpiryTime(new Date(Number(cacheTime) + 30 * 60 * 1000));
+ setCacheExpiryTime(new Date(Number(cacheTime) + 1440 * 60 * 1000));
setIsLoading(false);
return;
}
diff --git a/components/CacheControls.tsx b/components/CacheControls.tsx
index b9cf6fe..410ca50 100644
--- a/components/CacheControls.tsx
+++ b/components/CacheControls.tsx
@@ -25,7 +25,8 @@ const CacheControls: React.FC
- Cache will expire automatically at{" "} + Cache will expire automatically on{" "} + {cacheExpiryTime.toLocaleDateString()} at{" "} {cacheExpiryTime.toLocaleTimeString()}
)} @@ -36,31 +37,31 @@ const CacheControls: React.FC+
+
+