move back 😏
This commit is contained in:
31
apps/dashboard/src/components/report/chart/ChartEmpty.tsx
Normal file
31
apps/dashboard/src/components/report/chart/ChartEmpty.tsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import { FullPageEmptyState } from '@/components/full-page-empty-state';
|
||||
import { cn } from '@/utils/cn';
|
||||
|
||||
import { useChartContext } from './ChartProvider';
|
||||
import { MetricCardEmpty } from './MetricCard';
|
||||
|
||||
export function ChartEmpty() {
|
||||
const { editMode, chartType } = useChartContext();
|
||||
|
||||
if (editMode) {
|
||||
return (
|
||||
<FullPageEmptyState title="No data">
|
||||
We could not find any data for selected events and filter.
|
||||
</FullPageEmptyState>
|
||||
);
|
||||
}
|
||||
|
||||
if (chartType === 'metric') {
|
||||
return <MetricCardEmpty />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className={
|
||||
'aspect-video w-full max-h-[300px] min-h-[200px] flex justify-center items-center'
|
||||
}
|
||||
>
|
||||
No data
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user