Skip to content

Commit

Permalink
- interface fixes
Browse files Browse the repository at this point in the history
- avoi link over whitespace on most used
  • Loading branch information
radumojic committed Mar 15, 2024
1 parent 0c8b7f9 commit f0732e0
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { faBadgeCheck } from 'icons/solid';
export const VerifiedBadge = () => (
<div className='verified-badge-wrapper'>
<div className='verified-badge'>
<span className='d-none d-md-inline-block'>Verified</span>{' '}
<span className='d-none d-md-inline-block me-2'>Verified</span>{' '}
<FontAwesomeIcon icon={faBadgeCheck} size='sm' />
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.verified-badge-wrapper {
display: inline-block;
vertical-align: middle;
display: inline-flex;
@include media-breakpoint-up(md) {
display: inline-block;
vertical-align: middle;
}
.verified-badge {
display: flex;
align-items: center;
Expand Down
68 changes: 32 additions & 36 deletions src/widgets/MostUsed/MostUsedCollections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,46 +48,42 @@ export const MostUsedCollections = ({
<td>
<NetworkLink
to={urlBuilder.collectionDetails(collection.key)}
className={`d-flex text-truncate text-primary-200 ${
className={`d-flex align-items-center symbol trim text-truncate text-primary-200 w-min-content ${
collection.extraInfo?.assets?.svgUrl ? 'side-link' : ''
}`}
>
<div className='d-flex align-items-center symbol trim text-truncate'>
{collection.extraInfo?.assets ? (
<>
{collection.extraInfo.assets?.svgUrl && (
<img
src={collection.extraInfo.assets.svgUrl}
alt={
collection.extraInfo?.name ?? collection.key
}
className='side-icon me-1'
/>
)}
<div className='text-truncate'>
{collection.extraInfo?.name ? (
<>{collection.extraInfo.name}</>
) : (
<>{collection.key}</>
)}
</div>
{collection.extraInfo?.isVerified && (
<Overlay
title='Verified'
className='verified-badge-wrapper'
>
<FontAwesomeIcon
icon={faHexagonCheck}
size='sm'
className='text-yellow-spotlight ms-2'
/>
</Overlay>
{collection.extraInfo?.assets ? (
<>
{collection.extraInfo.assets?.svgUrl && (
<img
src={collection.extraInfo.assets.svgUrl}
alt={collection.extraInfo?.name ?? collection.key}
className='side-icon me-1'
/>
)}
<div className='text-truncate'>
{collection.extraInfo?.name ? (
<>{collection.extraInfo.name}</>
) : (
<>{collection.key}</>
)}
</>
) : (
<div className='text-truncate'>{collection.key}</div>
)}
</div>
</div>
{collection.extraInfo?.isVerified && (
<Overlay
title='Verified'
className='verified-badge-wrapper'
>
<FontAwesomeIcon
icon={faHexagonCheck}
size='sm'
className='text-yellow-spotlight ms-2'
/>
</Overlay>
)}
</>
) : (
<div className='text-truncate'>{collection.key}</div>
)}
</NetworkLink>
</td>
<td className='text-end'>
Expand Down
48 changes: 23 additions & 25 deletions src/widgets/MostUsed/MostUsedTokens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,35 +37,33 @@ export const MostUsedTokens = ({ data }: { data: MostUsedTokensType[] }) => {
<td>
<NetworkLink
to={urlBuilder.tokenDetails(token.key)}
className={`d-flex text-truncate text-primary-200 ${
className={`d-flex align-items-center symbol trim text-truncate text-primary-200 w-min-content ${
token.extraInfo?.assets?.svgUrl ? 'side-link' : ''
}`}
>
<div className='d-flex align-items-center symbol trim text-truncate'>
{token.extraInfo ? (
<>
{token.extraInfo?.assets?.svgUrl && (
<img
src={token.extraInfo?.assets.svgUrl}
alt={token.extraInfo?.name ?? token.key}
className='side-icon me-1'
/>
{token.extraInfo ? (
<>
{token.extraInfo?.assets?.svgUrl && (
<img
src={token.extraInfo?.assets.svgUrl}
alt={token.extraInfo?.name ?? token.key}
className='side-icon me-1'
/>
)}
<div className='text-truncate'>
{token.extraInfo?.name ? (
<>
{token.extraInfo.name} ({token.extraInfo.ticker}
)
</>
) : (
<>{token.key}</>
)}
<div className='text-truncate'>
{token.extraInfo?.name ? (
<>
{token.extraInfo.name} (
{token.extraInfo.ticker})
</>
) : (
<>{token.key}</>
)}
</div>
</>
) : (
<div className='text-truncate'>{token.key}</div>
)}
</div>
</div>
</>
) : (
<div className='text-truncate'>{token.key}</div>
)}
</NetworkLink>
</td>
<td className='text-neutral-300 text-end fw-600 pe-2'>
Expand Down

0 comments on commit f0732e0

Please sign in to comment.