github.com/turbot/steampipe@v1.7.0-rc.0.0.20240517123944-7cef272d4458/ui/dashboard/src/components/SnapshotHeader/index.tsx (about) 1 import { classNames } from "../../utils/styles"; 2 import { DashboardDataModeCLISnapshot } from "../../types"; 3 import { useDashboard } from "../../hooks/useDashboard"; 4 5 const SnapshotBanner = () => { 6 const { dataMode, snapshotFileName } = useDashboard(); 7 8 if (dataMode !== DashboardDataModeCLISnapshot) { 9 return null; 10 } 11 12 return ( 13 <div 14 className={classNames( 15 "w-full bg-dashboard border-b border-divide p-4 text-sm space-x-1 text-foreground-light" 16 )} 17 > 18 <span>Snapshot:</span> 19 <span>{snapshotFileName}</span> 20 </div> 21 ); 22 }; 23 24 export default SnapshotBanner;