From 4f6648ead80e67c8a4eeb828e43383c7d96a2de0 Mon Sep 17 00:00:00 2001 From: smanylov Date: Fri, 30 Jan 2026 12:35:53 +0700 Subject: [PATCH] add message for empty file list --- src/app/[locale]/login/page.tsx | 4 +- .../ui/dashboard/new/dashboard-user-files.tsx | 47 +++++++++++-------- src/i18n/messages/ru.json | 2 +- 3 files changed, 30 insertions(+), 23 deletions(-) diff --git a/src/app/[locale]/login/page.tsx b/src/app/[locale]/login/page.tsx index 1f9376d..fa94248 100644 --- a/src/app/[locale]/login/page.tsx +++ b/src/app/[locale]/login/page.tsx @@ -17,9 +17,9 @@ export default function Page() { return (
-
+{/*
-
+
*/}
diff --git a/src/app/ui/dashboard/new/dashboard-user-files.tsx b/src/app/ui/dashboard/new/dashboard-user-files.tsx index 89cfb6d..1bef3cd 100644 --- a/src/app/ui/dashboard/new/dashboard-user-files.tsx +++ b/src/app/ui/dashboard/new/dashboard-user-files.tsx @@ -125,29 +125,36 @@ export default function DashboardUserFiles() {
- {tableData?.map((file) => { - return ( -
-
- -
-
-
- {file.fileName} + + {tableData?.length ? ( + tableData?.map((file) => { + return ( +
+
+
-
- {convertBytes(file.size ? file.size : 0)} • {formatDate(file.uploadDate ? file.uploadDate : 0)} +
+
+ {file.fileName} +
+
+ {convertBytes(file.size ? file.size : 0)} • {formatDate(file.uploadDate ? file.uploadDate : 0)} +
+
+
+ {t(file.protectStatus)}
-
- {t(file.protectStatus)} -
-
- ) - })} + ) + }) + ) : ( +
+ {t('there-are-no-files-yet')} +
+ )}
) diff --git a/src/i18n/messages/ru.json b/src/i18n/messages/ru.json index a2c083a..2d74ade 100644 --- a/src/i18n/messages/ru.json +++ b/src/i18n/messages/ru.json @@ -204,7 +204,7 @@ "FAILED": "Ошибка", "FAILED_SAVE": "Сохранение не удалось", "view": "Посмотреть", - "are-no-violations": "Нарушений нету" + "are-no-violations": "Нарушений нет" }, "Login-register-form": { "and": "и",