import { useParams } from 'common' import { ReactNode } from 'react' import { ReportBlockContainer } from './ReportBlockContainer' import { InlineLink } from '@/components/ui/InlineLink' import { METRICS } from '@/lib/constants/metrics' interface DeprecatedChartBlockProps { label: string attribute: string actions?: ReactNode } export const DeprecatedChartBlock = ({ label, attribute, actions }: DeprecatedChartBlockProps) => { const { ref } = useParams() const metric = METRICS.find((x) => x.key === attribute) const logsName = metric?.category?.label const getLogsUrl = (logsName?: string) => { switch (logsName) { case 'Database API': return '/logs/postgrest-logs' case 'All API usage': return '/logs/explorer' case 'Realtime': return '/logs/realtime-logs' case 'Storage': return '/logs/storage-logs' case 'Authentication': return '/logs/auth-logs' default: return '' } } return (

This chart is not longer available, and can be removed from your report

You may view the equivalent of this data from the{' '} {logsName} Logs{' '} instead

) }