Skip to content

Commit

Permalink
Fix misc link preview edge cases (#1406)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeharding committed Apr 13, 2024
1 parent 8c6e7e4 commit 66b311d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/features/post/link/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const Img = styled.img`
const ThumbnailImg = styled.img`
margin: calc(-1 * var(--top-padding)) 0 calc(-1 * var(--top-padding))
calc(-1 * var(--start-padding));
height: 55px;
height: var(--height);
aspect-ratio: 0.85;
width: auto;
object-fit: cover;
Expand All @@ -57,7 +57,8 @@ const Bottom = styled.div<{ small?: boolean }>`
display: flex;
align-items: center;
min-height: ${({ small }) => (small ? "50px" : "40px")};
--height: ${({ small }) => (small ? "45px" : "55px")};
min-height: var(--height);
--gap: ${({ small }) => (small ? "8px" : "10px")};
Expand Down Expand Up @@ -174,7 +175,7 @@ export default function Link({
onError={() => setError(true)}
/>
)}
<Bottom small={small}>
<Bottom small={small || (!compact && !!thumbnail)}>
{compactIcon}
<UrlContainer>
<Text>{text}</Text>
Expand Down

0 comments on commit 66b311d

Please sign in to comment.