Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added qacc linkson the footer for SEO #4854

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lang/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@
"component.title.tos": "Termes d'Ús",
"component.title.user_guides": "Guies d'Usuari",
"component.title.we_hiring": "Estem contractant!",
"component.title.qacc": "Q/acc",
"component.title.qacc_news": "Q/acc News",
"component.title.what_is_giveth": "Què és Giveth?",
"component.title.with_your_donation": "amb la teva donació",
"component.tooltip.donate_anonymously": "En marcar això, no considerarem la informació del teu perfil com a donant per a aquesta donació i no la mostrarem a les pàgines públiques.",
Expand Down
2 changes: 2 additions & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@
"component.title.tos": "Terms of Use",
"component.title.user_guides": "User Guides",
"component.title.we_hiring": "We're Hiring!",
"component.title.qacc": "Q/acc",
"component.title.qacc_news": "Q/acc News",
"component.title.what_is_giveth": "What is Giveth?",
"component.title.with_your_donation": "with your Donation",
"component.tooltip.donate_anonymously": "By checking this, we won't consider your profile information as a donor for this donation and won't show it on public pages.",
Expand Down
2 changes: 2 additions & 0 deletions lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,8 @@
"label.oldest": "Más viejo",
"label.on": "en",
"label.onboarding_guide": "Guía de incorporación",
"component.title.qacc": "Q/acc",
"component.title.qacc_news": "Q/acc News",
Comment on lines +708 to +709
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Translate QACC-related strings to Spanish

The new QACC strings should be properly translated to Spanish for consistency:

-	"component.title.qacc": "Q/acc",
-	"component.title.qacc_news": "Q/acc News",
+	"component.title.qacc": "QACC",
+	"component.title.qacc_news": "Noticias QACC",

Also note that "Q/acc" should be "QACC" to match the casing used elsewhere.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"component.title.qacc": "Q/acc",
"component.title.qacc_news": "Q/acc News",
"component.title.qacc": "QACC",
"component.title.qacc_news": "Noticias QACC",

"label.one_million_giv": "1 Millón de GIV",
"label.one_round": "1 Ronda",
"label.one_time_donation": "Donación Única",
Expand Down
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/basic-features/typescript for more information.
18 changes: 17 additions & 1 deletion src/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,22 @@ const Footer = () => {
</LinkItem>
</a>
</LinkColumn>
<LinkColumn>
<a href={links.QACC} target='_blank'>
<LinkItem color={textColor}>
{formatMessage({
id: 'component.title.qacc',
})}
</LinkItem>
</a>
<a href={links.QACC_NEWS} target='_blank'>
<LinkItem color={textColor}>
{formatMessage({
id: 'component.title.qacc_news',
})}
</LinkItem>
</a>
</LinkColumn>
Comment on lines +145 to +160
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add security attributes to external links.

The external links are missing the rel="noreferrer noopener" attribute which is required for security when using target="_blank". This prevents potential reverse tabnabbing attacks.

Apply this diff to fix the security vulnerability:

-						<a href={links.QACC} target='_blank'>
+						<a href={links.QACC} target='_blank' rel="noreferrer noopener">
-						<a href={links.QACC_NEWS} target='_blank'>
+						<a href={links.QACC_NEWS} target='_blank' rel="noreferrer noopener">
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<LinkColumn>
<a href={links.QACC} target='_blank'>
<LinkItem color={textColor}>
{formatMessage({
id: 'component.title.qacc',
})}
</LinkItem>
</a>
<a href={links.QACC_NEWS} target='_blank'>
<LinkItem color={textColor}>
{formatMessage({
id: 'component.title.qacc_news',
})}
</LinkItem>
</a>
</LinkColumn>
<LinkColumn>
<a href={links.QACC} target='_blank' rel="noreferrer noopener">
<LinkItem color={textColor}>
{formatMessage({
id: 'component.title.qacc',
})}
</LinkItem>
</a>
<a href={links.QACC_NEWS} target='_blank' rel="noreferrer noopener">
<LinkItem color={textColor}>
{formatMessage({
id: 'component.title.qacc_news',
})}
</LinkItem>
</a>
</LinkColumn>

🛠️ Refactor suggestion

Enhance SEO with additional link attributes.

While the QACC links have been added, their SEO value could be improved by adding descriptive attributes.

Consider adding title and aria-label attributes to enhance SEO and accessibility:

 <a href={links.QACC} 
    target='_blank' 
+   title="QACC - Quadratic Autonomous Credit Consensus"
+   aria-label="Visit QACC platform"
    rel="noreferrer noopener">

Committable suggestion was skipped due to low confidence.

</LeftContainer>
<RightContainer color={textColor}>
<SocialContainer>
Expand Down Expand Up @@ -225,7 +241,7 @@ const LeftContainer = styled(Flex)`
gap: 0;

${mediaQueries.laptopL} {
gap: 0 72px;
gap: 0 0px;
}
`;

Expand Down
2 changes: 2 additions & 0 deletions src/lib/constants/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ const links = {
SWAG: 'https://swag.giveth.io/',
COMMONS_STACK: 'https://commonsstack.org/',
RECRUITEE: 'https://giveth.recruitee.com/',
QACC: 'https://qacc.giveth.io/',
QACC_NEWS: 'https://qacc.giveth.io/news',
JOINGIVFRENS: TYPEFORM + 'regenfarms',
DISCORD_SUPPORT: 'https://discord.gg/TeWHtAjNQT',
CALENDAR:
Expand Down
Loading