Skip to content

Commit 42ae048

Browse files
committed
refactor: remove width prop and move to new directory
1 parent f935e47 commit 42ae048

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/app/components/collectibles/src20-image.tsx renamed to src/app/components/src20/src20-image.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useState } from 'react';
22

33
import { css } from 'leather-styles/css';
44

5-
import { Eye1ClosedIcon } from '@leather.io/ui';
5+
import { Src20AvatarIcon } from '@leather.io/ui';
66

77
interface Src20ImageProps {
88
alt?: string;
@@ -14,7 +14,7 @@ export function Src20Image(props: Src20ImageProps) {
1414
const [isLoading, setIsLoading] = useState(true);
1515
const [width, setWidth] = useState(0);
1616

17-
if (isError) return <Eye1ClosedIcon />;
17+
if (isError) return <Src20AvatarIcon />;
1818

1919
return (
2020
<img
@@ -29,7 +29,6 @@ export function Src20Image(props: Src20ImageProps) {
2929
src={src}
3030
className={css({
3131
width: 'xl',
32-
aspectRatio: '1 / 1',
3332
borderRadius: '100%',
3433
objectFit: 'cover',
3534
// display: 'none' breaks onLoad event firing

src/app/features/asset-list/bitcoin/src20-token-asset-list/src20-token-asset-list.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ import { Src20AvatarIcon } from '@leather.io/ui';
44
import { getAssetDisplayName } from '@leather.io/utils';
55

66
import { useManageTokens } from '@app/common/hooks/use-manage-tokens';
7-
import { CollectibleImage } from '@app/components/collectibles/collectible-image';
8-
import { Src20Image } from '@app/components/collectibles/src20-image';
97
import { CryptoAssetItem } from '@app/components/crypto-asset-item/crypto-asset-item';
108
import type { Src20TokenAssetDetails } from '@app/components/loaders/src20-tokens-loader';
9+
import { Src20Image } from '@app/components/src20/src20-image';
1110
import { useIsPrivateMode } from '@app/store/settings/settings.selectors';
1211

1312
import type { AssetRightElementVariant } from '../../asset-list';

0 commit comments

Comments
 (0)