diff --git a/src/components/profile/profile-item.tsx b/src/components/profile/profile-item.tsx index d29cdcf4..f5059df9 100644 --- a/src/components/profile/profile-item.tsx +++ b/src/components/profile/profile-item.tsx @@ -65,7 +65,10 @@ import { ListFilter, ListTree, CheckCircle, + Infinity, + RefreshCw } from "lucide-react"; +import {t} from "i18next"; // Активируем плагин для dayjs dayjs.extend(relativeTime); @@ -89,8 +92,8 @@ const parseExpire = (expire?: number | string): string | null => { const expireDate = dayjs(expireTimestamp * 1000); if (!expireDate.isValid()) return null; const now = dayjs(); - if (expireDate.isBefore(now)) return "Expired"; - return `Expires in ${expireDate.fromNow(true)}`; + if (expireDate.isBefore(now)) return t("Expired"); + return t('Expires in', { duration: expireDate.fromNow(true) }); }; type MenuItemAction = { @@ -307,6 +310,7 @@ export const ProfileItem = (props: Props) => {

{name}

+ {expireInfo === t("Expired") ? {t(expireInfo)} : null}
{
+ + {expireInfo === null ? : expireInfo} + +
+
+
+
+ {updated > 0 ? dayjs(updated * 1000).fromNow() @@ -338,18 +350,8 @@ export const ProfileItem = (props: Props) => { )}
- {expireInfo && ( - - - {expireInfo} - - )}
+
diff --git a/src/pages/profiles.tsx b/src/pages/profiles.tsx index 09b19d07..4ab9e8a1 100644 --- a/src/pages/profiles.tsx +++ b/src/pages/profiles.tsx @@ -499,7 +499,7 @@ const ProfilePage = () => { onDragEnd={onDragEnd} >
-
+
x.uid)}> {profileItems.map((item) => (