import { Button } from "@/components/ui/button"; 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 at{" "} {cacheExpiryTime.toLocaleTimeString()}

)} ) : (

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

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