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;