import React, { useState } from 'react'; import { Button, ConfirmModal } from '@grafana/ui'; import { Props } from './DataSourceCache'; export const CacheClean = (props: Props) => { const { cleanCache, pageId } = props; const [showCleanModal, setShowCleanModal] = useState(false); const showConfirmCleanModal = (show: boolean) => () => { setShowCleanModal(show); }; const handleCleanCache = () => { cleanCache(pageId); setShowCleanModal(false); }; return (