diff --git a/package.json b/package.json
index d83a96a..bc01c80 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "no-copy-frontend",
- "version": "0.22.0",
+ "version": "0.23.0",
"private": true,
"scripts": {
"dev": "next dev -p 2999",
diff --git a/src/app/[locale]/pages/violations/page.tsx b/src/app/[locale]/pages/violations/page.tsx
index 3ff880b..3e83132 100644
--- a/src/app/[locale]/pages/violations/page.tsx
+++ b/src/app/[locale]/pages/violations/page.tsx
@@ -1,10 +1,10 @@
import PageTitleColorFrame from '@/app/ui/page-title-color-frame';
-import ProtectionStatistic from '@/app/ui/marking-page/new/protection-statistic';
import DahboardGeographySection from '@/app/ui/dashboard/new/dashboard-geography-section';
import DashboardPlatformsList from '@/app/ui/dashboard/new/dashboard-platforms-list';
import ViolationsMyCases from '@/app/ui/violations/violations-my-cases';
import ViolationsCheckAllSection from '@/app/ui/violations/violations-check-all-section';
import ViolationsTable from '@/app/ui/violations/violations-table';
+import ViolationsStatistic from '@/app/ui/violations/violations-statistic';
export default function Page() {
const FILE_TYPE = "all";
@@ -14,7 +14,7 @@ export default function Page() {
title="monitoring-copyright-infringements"
description="monitoring-copyright-infringements-description"
/>
-
+
diff --git a/src/app/ui/violations/violations-statistic.tsx b/src/app/ui/violations/violations-statistic.tsx
new file mode 100644
index 0000000..0d31d0c
--- /dev/null
+++ b/src/app/ui/violations/violations-statistic.tsx
@@ -0,0 +1,64 @@
+'use client'
+
+import { useTranslations } from 'next-intl';
+import { useQuery } from '@tanstack/react-query';
+import { getUserFilesInfo } from '@/app/actions/action';
+import { convertBytes } from '@/app/lib/convertBytes';
+
+type FilesInfo = {
+ totalSize: number;
+ totalCount: number;
+};
+
+export default function ViolationsStatistic() {
+ const t = useTranslations('Global');
+
+ const {
+ data: filesInfo,
+ isLoading,
+ isError,
+ error,
+ } = useQuery<{
+ all_files_size: number,
+ all_files_quantity: number
+ }, Error, FilesInfo>({
+ queryKey: ['userFilesInfo'],
+ queryFn: getUserFilesInfo,
+ select: (data): FilesInfo => {
+ if (!data) {
+ return {
+ totalSize: 0,
+ totalCount: 0
+ }
+ }
+
+ return {
+ totalSize: data.all_files_size,
+ totalCount: data.all_files_quantity
+ }
+ }
+ });
+
+ return (
+
+
+
0
+
{t(`total-violations`)}
+
+
+
+
+ 0
+
+
{t(`in-progress`)}
+
+
+
0
+
{t('it-decided')}
+
+
+ )
+}
\ No newline at end of file
diff --git a/src/i18n/messages/en.json b/src/i18n/messages/en.json
index 5242c84..fb206fa 100644
--- a/src/i18n/messages/en.json
+++ b/src/i18n/messages/en.json
@@ -190,7 +190,11 @@
"image-occupy": "Occupied by Images",
"video-occupy": "Occupied by Videos",
"audio-occupy": "Occupied by Audio",
- "violations-found": "Violations found"
+ "violations-found": "Violations found",
+ "total-violations": "Total violations",
+ "new": "new",
+ "in-progress": "In progress",
+ "it-decided": "It's decided"
},
"Login-register-form": {
"and": "and",
diff --git a/src/i18n/messages/ru.json b/src/i18n/messages/ru.json
index 2db57a8..a561477 100644
--- a/src/i18n/messages/ru.json
+++ b/src/i18n/messages/ru.json
@@ -190,7 +190,11 @@
"image-occupy": "Занимают изображения",
"video-occupy": "Занимают видео",
"audio-occupy": "Занимают аудио",
- "violations-found": "Найдено нарушений"
+ "violations-found": "Найдено нарушений",
+ "total-violations": "Всего нарушений",
+ "new": "Новые",
+ "in-progress": "В работе",
+ "it-decided": "Решено"
},
"Login-register-form": {
"and": "и",