2026-03-18 15:21:49 +07:00
|
|
|
'use client'
|
|
|
|
|
|
|
|
|
|
import { useUserFilesInfo } from '@/app/hooks/react-query/useUserFilesInfo';
|
|
|
|
|
import { useTranslations } from 'next-intl';
|
2026-04-28 13:08:35 +07:00
|
|
|
import { useMonitoringStats } from '@/app/hooks/react-query/useMonitoringStats';
|
|
|
|
|
import { useViolationFinalSummaryStatistic } from '@/app/hooks/react-query/useViolationFinalSummaryStatistic';
|
2026-03-18 15:21:49 +07:00
|
|
|
|
2025-12-04 18:21:39 +07:00
|
|
|
export default function FinalSummary() {
|
2026-03-18 15:21:49 +07:00
|
|
|
const t = useTranslations('Global');
|
|
|
|
|
const { data: filesInfo, isLoading, isError, error } = useUserFilesInfo();
|
2026-04-28 13:08:35 +07:00
|
|
|
const { data: violationStatistic } = useViolationFinalSummaryStatistic();
|
2026-04-01 11:24:47 +07:00
|
|
|
const { data: monitoringStats } = useMonitoringStats();
|
2026-03-18 15:21:49 +07:00
|
|
|
|
2025-12-04 18:21:39 +07:00
|
|
|
return (
|
|
|
|
|
<div className="final-summary">
|
|
|
|
|
<div className="summary-header">
|
|
|
|
|
<h2 className="summary-title">
|
2026-04-28 13:08:35 +07:00
|
|
|
{t('summary-statistics')}
|
2025-12-04 18:21:39 +07:00
|
|
|
</h2>
|
|
|
|
|
<p className="summary-subtitle">
|
2026-03-18 15:21:49 +07:00
|
|
|
{t('general-indicators-of-the-protection-system')}
|
2025-12-04 18:21:39 +07:00
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="summary-stats">
|
|
|
|
|
<div className="summary-stat">
|
2026-04-01 11:24:47 +07:00
|
|
|
<div className="summary-stat-value">
|
|
|
|
|
{monitoringStats?.total_searches ? monitoringStats?.total_searches : 0}
|
2026-04-28 13:08:35 +07:00
|
|
|
</div>
|
2026-03-18 15:21:49 +07:00
|
|
|
<div className="summary-stat-label">
|
|
|
|
|
{t('total-number-of-checks')}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="summary-stat center">
|
|
|
|
|
<div>
|
2026-03-19 12:49:46 +07:00
|
|
|
<div className="summary-stat-value">
|
2026-03-31 17:58:21 +07:00
|
|
|
{violationStatistic?.total_violations ?? 0}
|
2026-03-19 12:49:46 +07:00
|
|
|
</div>
|
2026-03-18 15:21:49 +07:00
|
|
|
<div className="summary-stat-label">
|
2026-04-21 13:11:51 +07:00
|
|
|
{t('matches-found')}
|
2026-03-18 15:21:49 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
2026-03-19 12:49:46 +07:00
|
|
|
<div className="summary-stat-value">
|
2026-04-28 13:08:35 +07:00
|
|
|
{violationStatistic?.total_complaints ?? 0}
|
2026-03-19 12:49:46 +07:00
|
|
|
</div>
|
2026-03-18 15:21:49 +07:00
|
|
|
<div className="summary-stat-label">
|
|
|
|
|
{t('violations-registered')}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-04-28 13:08:35 +07:00
|
|
|
<div>
|
|
|
|
|
<div className="summary-stat-value">
|
|
|
|
|
{violationStatistic?.total_law_cases ?? 0}
|
|
|
|
|
</div>
|
|
|
|
|
<div className="summary-stat-label">
|
|
|
|
|
{t('claims-registered')}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-12-04 18:21:39 +07:00
|
|
|
</div>
|
|
|
|
|
<div className="summary-stat">
|
2026-03-18 15:21:49 +07:00
|
|
|
<div className="summary-stat-value">{filesInfo?.total.quantity ? filesInfo?.total.quantity : 0}</div>
|
|
|
|
|
<div className="summary-stat-label">
|
|
|
|
|
{t('protected-content')}
|
|
|
|
|
</div>
|
2025-12-04 18:21:39 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|