1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

UX: Remove height from loading block, use modern components (#20134)

* UX: Remove height from loading block, use modern components

* Fix lint
This commit is contained in:
David Walsh 2023-07-24 10:35:37 -05:00 committed by GitHub
parent 937fcdc563
commit 9575075dc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,12 @@ import { useI18nContext } from '../../../hooks/useI18nContext';
import { useTokenTracker } from '../../../hooks/useTokenTracker';
import { getShouldHideZeroBalanceTokens } from '../../../selectors';
import { getTokens } from '../../../ducks/metamask/metamask';
import { Box } from '../../component-library';
import {
AlignItems,
Display,
JustifyContent,
} from '../../../helpers/constants/design-system';
export default function TokenList({ onTokenClick }) {
const t = useI18nContext();
@ -25,17 +31,14 @@ export default function TokenList({ onTokenClick }) {
);
if (loading) {
return (
<div
style={{
display: 'flex',
height: '250px',
alignItems: 'center',
justifyContent: 'center',
padding: '30px',
}}
<Box
display={Display.Flex}
alignItems={AlignItems.center}
justifyContent={JustifyContent.center}
padding={7}
>
{t('loadingTokens')}
</div>
</Box>
);
}