Skip to content

Commit

Permalink
Merge pull request #3327 from owid/homepage-small-fixes
Browse files Browse the repository at this point in the history
fix(homepage): url-encode tag name for icon
  • Loading branch information
marcelgerber authored Mar 11, 2024
2 parents 7788e9e + 9b26564 commit de07974
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion site/gdocs/components/ExplorerTiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ function ExplorerTile({ url }: { url: string }) {
<img
height={40}
width={40}
src={`${BAKED_BASE_URL}/images/tag-icons/${linkedChart.tags[0].name}.svg`}
src={`${BAKED_BASE_URL}/images/tag-icons/${encodeURIComponent(
linkedChart.tags[0].name
)}.svg`}
className="explorer-tile__icon"
alt={`Icon for topic ${linkedChart.tags[0].name}`}
loading="lazy"
/>
) : null

Expand Down
1 change: 1 addition & 0 deletions site/gdocs/components/HomepageIntro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ export function HomepageIntro({ className, featuredWork }: HomepageIntroProps) {
alt="Logos of the publications that have used our content. From left to right: Science, Nature, PNAS, BBC, Financial Times, The New York Times, The Guardian, The Atlantic, and The Washington Post"
width={230}
height={75}
loading="lazy"
/>
</section>
<section className="grid grid-cols-9 span-cols-9 col-start-5 span-md-cols-12 col-md-start-2 homepage-intro__right-section">
Expand Down

0 comments on commit de07974

Please sign in to comment.