Skip to content

Commit 2247813

Browse files
committed
showing default token incase no value selected to make better user experience
1 parent 1cdb9f7 commit 2247813

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/components/common/tokenImage.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ const TokenImage: FC<TokenImageProps> = ({
1111
className
1212
}) => {
1313

14+
if (symbol === 'Token') {
15+
return (
16+
<div className={`w-8 h-8 rounded-full bg-gray-400 dark:bg-gray-700`}>
17+
</div>
18+
)
19+
}
20+
1421
return (
1522
<img
1623
src={`${DATA_URL_TOKEN_ASSET}/${symbol.toLowerCase()}.svg`}

src/layout/bridge/TokenAmountSelection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export const TokenSelection: React.FC = () => {
1515
<Button
1616
onClick={() => { openModal(ModalIds.TokenPicker) }}
1717
className="flex h-11 justify-start items-center gap-1 w-full rounded-s-full shadow-sm px-[12px] py-2 text-gray-800 border border-gray-500 dark:border-dark-gray-300 bg-transperant">
18-
<TokenImage symbol={selectedToken?.symbol ?? 'BOBA'} />
19-
<Text variant="small" >{selectedToken?.symbol ?? 'Boba'}</Text>
18+
<TokenImage symbol={selectedToken?.symbol ?? 'Token'} />
19+
<Text variant="small" >{selectedToken?.symbol ?? 'Token'}</Text>
2020
</Button>
2121
</div>
2222
}

0 commit comments

Comments
 (0)