Files
mtdb_movie/resources/client/admin/reports/insights/insights-plays-chart.tsx
maher 703f50a09d
Some checks failed
Build / run (push) Has been cancelled
first commit
2025-10-29 11:42:25 +01:00

30 lines
825 B
TypeScript
Executable File

import {LineChart} from '@common/charts/line-chart';
import {Trans} from '@common/i18n/trans';
import {FormattedNumber} from '@common/i18n/formatted-number';
import React from 'react';
import {InsightsAsyncChart} from '@app/admin/reports/insights/insights-async-chart';
export function InsightsPlaysChart() {
return (
<InsightsAsyncChart metric="plays">
{({data}) => (
<LineChart
className="flex-auto"
title={<Trans message="Plays" />}
hideLegend
description={
<Trans
message=":count total plays"
values={{
count: (
<FormattedNumber value={data?.report.plays.total || 0} />
),
}}
/>
}
/>
)}
</InsightsAsyncChart>
);
}