From 96057dbcf25b5b6c77c653885f328174f04e1e67 Mon Sep 17 00:00:00 2001 From: Oleg Vavilov Date: Tue, 17 Jun 2025 22:36:51 +0300 Subject: [PATCH] [Bug]: Empty spaces on User Details page #2745 --- .../src/pages/User/Details/Billing/index.tsx | 8 +- .../src/pages/User/Details/Payments/index.tsx | 1 + .../src/pages/User/Details/Projects/index.tsx | 18 +++- .../src/pages/User/Details/Settings/index.tsx | 96 +++++++++---------- frontend/src/pages/User/Details/index.tsx | 8 +- 5 files changed, 70 insertions(+), 61 deletions(-) diff --git a/frontend/src/pages/User/Details/Billing/index.tsx b/frontend/src/pages/User/Details/Billing/index.tsx index f3385dd4eb..5e346169a6 100644 --- a/frontend/src/pages/User/Details/Billing/index.tsx +++ b/frontend/src/pages/User/Details/Billing/index.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useParams, useSearchParams } from 'react-router-dom'; -import { Box, Button, Container, Header, Hotspot, Loader, Modal, SpaceBetween } from 'components'; +import { Box, Button, Header, Hotspot, Loader, Modal, SpaceBetween } from 'components'; import { PermissionGuard } from 'components/PermissionGuard'; import { HotspotIds } from 'layouts/AppLayout/TutorialPanel/constants'; @@ -102,7 +102,9 @@ export const Billing: React.FC = () => { return ( - {t('billing.balance')}}> +
+
{t('billing.balance')}
+ {isLoading && } {data && ( @@ -126,7 +128,7 @@ export const Billing: React.FC = () => { )} - +
= ({ payments, emptyMessageContent, isLo { .sort((a, b) => new Date(b.created_at) - new Date(a.created_at)); }, [data]); - const { items, collectionProps, paginationProps } = useCollection(filteredData, { + const { + items, + collectionProps, + // paginationProps + } = useCollection(filteredData, { filtering: { empty: renderEmptyMessage(), }, - pagination: { pageSize: 20 }, + // pagination: { pageSize: 20 }, selection: {}, }); @@ -66,11 +75,12 @@ export const UserProjectList: React.FC = () => { return (
} + // pagination={} /> ); }; diff --git a/frontend/src/pages/User/Details/Settings/index.tsx b/frontend/src/pages/User/Details/Settings/index.tsx index 0338ddd02b..da08b4ca6c 100644 --- a/frontend/src/pages/User/Details/Settings/index.tsx +++ b/frontend/src/pages/User/Details/Settings/index.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { useNavigate, useParams } from 'react-router-dom'; -import { Box, Button, ColumnLayout, Container, Header, Link, Loader, Popover, SpaceBetween, StatusIndicator } from 'components'; +import { Box, Button, ColumnLayout, Header, Link, Loader, Popover, SpaceBetween, StatusIndicator } from 'components'; import { PermissionGuard } from 'components/PermissionGuard'; import { useAppSelector, useBreadcrumbs, usePermissionGuard } from 'hooks'; @@ -52,63 +52,59 @@ export const Settings: React.FC = () => { return (
- - {t('common.edit')} - - } - > - {t('users.account_settings')} - +
+ {t('common.edit')} + } > - {isLoading && } + {t('users.account_settings')} +
- {data && ( - - - {/*
*/} - {/* {t('users.user_name')}*/} - {/*
{data.user_name}
*/} - {/*
*/} + {isLoading && } -
- {t('users.email')} -
{data.email ? {data.email} : '-'}
-
+ {data && ( + + + {/*
*/} + {/* {t('users.user_name')}*/} + {/*
{data.user_name}
*/} + {/*
*/} - -
- {t('users.global_role')} -
{t(`roles.${data.global_role}`)}
-
-
+
+ {t('users.email')} +
{data.email ? {data.email} : '-'}
+
+
- {t('users.token')} - -
- {t('users.token_copied')}} - > -
+ {t('users.global_role')} +
{t(`roles.${data.global_role}`)}
+
+
+ +
+ {t('users.token')} + +
+ {t('users.token_copied')}} + > +
- - - )} - +
+
+
+ )}
); }; diff --git a/frontend/src/pages/User/Details/index.tsx b/frontend/src/pages/User/Details/index.tsx index 5ae99ec17f..805b2efc98 100644 --- a/frontend/src/pages/User/Details/index.tsx +++ b/frontend/src/pages/User/Details/index.tsx @@ -63,16 +63,19 @@ export const UserDetails: React.FC = () => { label: t('users.settings'), id: UserDetailsTabTypeEnum.SETTINGS, href: ROUTES.USER.DETAILS.FORMAT(paramUserName), + content: , }, { label: t('users.projects'), id: UserDetailsTabTypeEnum.PROJECTS, href: ROUTES.USER.PROJECTS.FORMAT(paramUserName), + content: , }, process.env.UI_VERSION === 'sky' && { label: t('billing.title'), id: UserDetailsTabTypeEnum.BILLING, href: ROUTES.USER.BILLING.LIST.FORMAT(paramUserName), + content: , }, ].filter(Boolean); @@ -88,10 +91,7 @@ export const UserDetails: React.FC = () => { } > -
-
- - +