Skip to content

Commit f80122e

Browse files
ChengaDevclaude
andcommitted
Fix CLS: add explicit dimensions to PayPal button and flag images
- PayPal input[type=image]: add width=147 height=47 so browser reserves space - Flag images: add width=22 to match height=15, preventing reflow on load Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 03a1569 commit f80122e

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/components/DonateButton.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ const DonateButton = () => {
1818
name="submit"
1919
title="PayPal - The safer, easier way to pay online!"
2020
alt="Donate with PayPal button"
21+
width="147"
22+
height="47"
2123
/>
2224
<img
2325
alt=""

src/components/LanguageSelector.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ const LanguageSelector = () => {
2626
return (
2727
<Container>
2828
<FlagContainer onClick={() => handleLanguageChange(LanguageCodes.Italian)} aria-label="Switch to Italian">
29-
<Flag height="15" code="ITA" />
29+
<Flag height="15" width="22" code="ITA" />
3030
</FlagContainer>
3131
<FlagContainer onClick={() => handleLanguageChange(LanguageCodes.Spanish)} aria-label="Switch to Spanish">
32-
<Flag height="15" code="ES" />
32+
<Flag height="15" width="22" code="ES" />
3333
</FlagContainer>
3434
<FlagContainer onClick={() => handleLanguageChange(LanguageCodes.French)} aria-label="Switch to French">
35-
<Flag height="15" code="FR" />
35+
<Flag height="15" width="22" code="FR" />
3636
</FlagContainer>
3737
<FlagContainer onClick={() => handleLanguageChange(LanguageCodes.English)} aria-label="Switch to English">
38-
<Flag height="15" code="US" />
38+
<Flag height="15" width="22" code="US" />
3939
</FlagContainer>
4040
</Container>
4141
)

0 commit comments

Comments
 (0)