Skip to content

Commit

Permalink
Removed favicon box when linkFavicon is null (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakerhetspolisen authored Feb 12, 2022
1 parent d0fbf78 commit abbb5bf
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,27 @@ export default function Header({ shareData }) {
alignItems: "center",
}}
>
<div
style={{
width: "3.2rem",
height: "3.2rem",
borderRadius: 6,
flexShrink: 0,
flexBasis: "3.2rem",
}}
>
<img
src={shareData.linkFavicon}
alt={`Favicon for ${shareData.title}`}
{shareData.linkFavicon !== "" && (
<div
style={{
width: "100%",
height: "100%",
width: "3.2rem",
height: "3.2rem",
borderRadius: 6,
flexShrink: 0,
overflow: "hidden",
flexBasis: "3.2rem",
}}
/>
</div>
>
<img
src={shareData.linkFavicon}
alt={`Favicon for ${shareData.linkTitle}`}
style={{
width: "100%",
height: "100%",
}}
/>
</div>
)}
<div>
<span
style={{
Expand Down

0 comments on commit abbb5bf

Please sign in to comment.