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

link out to staking in announcement message #3482

Merged
merged 2 commits into from
Jan 6, 2025
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
LANDING_PATH,
TELEGRAM_URL,
TWITTER_URL,
STAKE_SYN_FOR_CX_URL,
} from '@/constants/urls'
import { NAVIGATION } from '@/constants/routes'
import { MoreButton } from './MoreButton'
Expand Down Expand Up @@ -51,6 +52,22 @@ const TODO_REMOVE_wrapperStyle = {
backgroundRepeat: 'no-repeat',
}

const StakingBannerContent = () => {
return (
<div>
Stake your SYN to receive CX (Cortex Protocol) tokens{' '}
<a
href={STAKE_SYN_FOR_CX_URL}
target="blank"
className="underline hover:cursor hover:text-white/65"
>
here
</a>
!
</div>
)
}
Comment on lines +55 to +69
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

Use _blank and add rel="noopener noreferrer" for external links.
When opening links in a new tab, always ensure to use target="_blank" and rel="noopener noreferrer" to ensure safe navigation.

Apply this diff to fix the target and add rel attributes:

-<a
-  href={STAKE_SYN_FOR_CX_URL}
-  target="blank"
-  className="underline hover:cursor hover:text-white/65"
->
+<a
+  href={STAKE_SYN_FOR_CX_URL}
+  target="_blank"
+  rel="noopener noreferrer"
+  className="underline hover:cursor-pointer hover:text-white/65"
+>
📝 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
const StakingBannerContent = () => {
return (
<div>
Stake your SYN to receive CX (Cortex Protocol) tokens{' '}
<a
href={STAKE_SYN_FOR_CX_URL}
target="blank"
className="underline hover:cursor hover:text-white/65"
>
here
</a>
!
</div>
)
}
const StakingBannerContent = () => {
return (
<div>
Stake your SYN to receive CX (Cortex Protocol) tokens{' '}
<a
href={STAKE_SYN_FOR_CX_URL}
target="_blank"
rel="noopener noreferrer"
className="underline hover:cursor-pointer hover:text-white/65"
>
here
</a>
!
</div>
)
}


export function LandingPageWrapper({ children }: { children: any }) {
return (
<div className="dark">
Expand All @@ -60,9 +77,10 @@ export function LandingPageWrapper({ children }: { children: any }) {
>
<AnnouncementBanner
bannerId="2024-12-18-cortex-staking"
bannerContent="Stake your SYN to receive CX (Cortex Protocol) tokens!"
bannerContent={<StakingBannerContent />}
// bannerContent="Stake your SYN to receive CX (Cortex Protocol) tokens!"
startDate={new Date('2024-12-17T18:45:09+00:00')}
endDate={new Date('2025-01-25T18:45:09+00:00')}
endDate={new Date('2025-02-25T18:45:09+00:00')}
/>
<MaintenanceBanners />
<LandingNav />
Expand Down
Loading