Skip to content

Commit

Permalink
opss
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-schrammel committed Nov 25, 2024
1 parent 51fee69 commit 4573d00
Show file tree
Hide file tree
Showing 4 changed files with 434 additions and 150 deletions.
18 changes: 15 additions & 3 deletions src/components/coin-icon/ChainImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@ import AvalancheBadge from '@/assets/badges/avalanche.png';
import BlastBadge from '@/assets/badges/blast.png';
import DegenBadge from '@/assets/badges/degen.png';
import ApechainBadge from '@/assets/badges/apechain.png';
import FastImage, { Source } from 'react-native-fast-image';
import FastImage, { FastImageProps, Source } from 'react-native-fast-image';

export function ChainImage({ chainId, size = 20 }: { chainId: ChainId | null | undefined; size?: number }) {
export function ChainImage({
chainId,
size = 20,
style,
}: {
chainId: ChainId | null | undefined;
size?: number;
style?: FastImageProps['style'];
}) {
const source = useMemo(() => {
switch (chainId) {
case ChainId.apechain:
Expand Down Expand Up @@ -47,6 +55,10 @@ export function ChainImage({ chainId, size = 20 }: { chainId: ChainId | null | u
if (!chainId) return null;

return (
<FastImage key={`${chainId}-badge-${size}`} source={source as Source} style={{ borderRadius: size / 2, height: size, width: size }} />
<FastImage
key={`${chainId}-badge-${size}`}
source={source as Source}
style={[{ borderRadius: size / 2, height: size, width: size }, style]}
/>
);
}
1 change: 1 addition & 0 deletions src/languages/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -2986,6 +2986,7 @@
"farcaster": "Farcaster"
},
"sort": {
"sort": "Sort",
"volume": "Volume",
"market_cap": "Market Cap",
"top_gainers": "Top Gainers",
Expand Down
Loading

0 comments on commit 4573d00

Please sign in to comment.