From d07f0b410b025173b960604363d84ec20e6b4bbb Mon Sep 17 00:00:00 2001 From: Bram Suurd Date: Sat, 3 Aug 2024 14:08:24 +0200 Subject: [PATCH] chore: Remove CacheControls component --- components/CacheControls.tsx | 73 ------------------------------------ 1 file changed, 73 deletions(-) delete mode 100644 components/CacheControls.tsx diff --git a/components/CacheControls.tsx b/components/CacheControls.tsx deleted file mode 100644 index 6ebf597..0000000 --- a/components/CacheControls.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import { Button } from "@/components/ui/button"; -import { DatabaseBackup, Database, DatabaseZap } from "lucide-react"; -import { Separator } from "./ui/separator"; - -interface CacheControlsProps { - isCacheEnabled: boolean; - toggleCache: () => void; - handleForceUpdate: () => void; - cacheExpiryTime: Date | null; -} - -const CacheControls: React.FC = ({ - isCacheEnabled, - toggleCache, - handleForceUpdate, - cacheExpiryTime, -}) => { - return ( -
- -
-
- {isCacheEnabled ? ( - <> -

- The scripts are cached in your browser to optimize performance. - Use the button below to re-poll the server for changes. -

- {cacheExpiryTime && ( -

- Cache will expire automatically on{" "} - {cacheExpiryTime.toLocaleDateString()} at{" "} - {cacheExpiryTime.toLocaleTimeString()} -

- )} - - ) : ( -

- The cache is disabled. All data will be fetched from the server. -

- )} -
-
- {isCacheEnabled ? ( - <> - - - - ) : ( - - )} -
-
-
- ); -}; - -export default CacheControls;