Skip to content

Commit

Permalink
fix: Token page images
Browse files Browse the repository at this point in the history
  • Loading branch information
drake-nathan committed Oct 12, 2023
1 parent 2b39fe9 commit 7b2d53e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 7 additions & 0 deletions components/TokenPage/Module/TokenModule.styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,10 @@ export const InnerContainer = styled.div<Props>`
width: auto;
}
`;

export const Image = styled.img<{ $aspectRatio: number }>`
aspect-ratio: ${({ $aspectRatio }) => $aspectRatio};
object-fit: cover;
width: 100%;
border: 1px solid ${({ theme: { colors } }) => colors.textMain};
`;
5 changes: 2 additions & 3 deletions components/TokenPage/Module/TokenModule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,10 @@ const TokenModule = ({ token, project }: Props): JSX.Element => {
width={width}
/>
) : (
<Image
<St.Image
src={imageMid || image}
alt="Token Image"
width={width}
height={height}
$aspectRatio={aspectRatio}
/>
)}
<BottomBar token={token} project={project} />
Expand Down

0 comments on commit 7b2d53e

Please sign in to comment.