Skip to content

Conversation

@sunilkumawat-96
Copy link

@sunilkumawat-96 sunilkumawat-96 commented Dec 13, 2025

Clickable Social Media Icons: Telegram, Discord, LinkedIn, and Twitter icons now open the respective pages.

Sharing Buttons Added: Users can share the project on Twitter, LinkedIn, Telegram, and Discord.

Consistent Styling: Gradients, hover effects, and shadows match the existing design.

Usability & Discoverability: Users can now both connect with the project and easily share it on social media.

Summary by CodeRabbit

  • New Features
    • Added a "Share this project" section in the footer with convenient sharing links for Twitter, LinkedIn, Telegram, and Discord, enabling users to easily share the project across social platforms.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 13, 2025

Walkthrough

Footer component enhanced with social sharing functionality. Adds dynamic share links for Twitter, LinkedIn, Telegram, and Discord using the current page URL. Reorganizes footer layout with dedicated project info and social icons sections while reusing existing icon components.

Changes

Cohort / File(s) Summary
Footer Social Sharing
components/footer.tsx
Introduces currentUrl from window.location.href for client-safe URL access. Adds "Share this project" section with platform-specific share links. Restructures footer layout with project info and social icons blocks. Reuses existing icon components (Twitter, LinkedIn, Telegram, Discord) for share buttons. Minor comment and formatting adjustments.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Attention areas:
    • Verify client-side safety of window.location.href access pattern
    • Confirm share URL encoding and link generation for each platform
    • Check responsive layout behavior of restructured footer sections

Poem

A footer now whispers with voice so keen,
Share to the world what you've here seen! 🐰
Twitter, LinkedIn, Discord too,
Telegram magic—spreading the word anew! ✨
Social buttons hop through the page,
Your project takes center stage! 🎉

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'components' is overly vague and generic, failing to convey any meaningful information about the changeset. Use a more descriptive title that reflects the main change, such as 'Add social media sharing buttons to footer' or 'Enhance footer with social sharing functionality'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
components/footer.tsx (1)

67-84: Consider using gradient styling to match the footer theme.

The share buttons use standard blue colors (bg-blue-500, bg-blue-700, etc.) while the rest of the footer uses gradient styling (from-[#228B22] to-[#5A981A]). This creates a visual inconsistency.

Consider applying gradient styles similar to the social media icons above for visual consistency:

-            <a href={`https://twitter.com/intent/tweet?text=${encodedText}&url=${encodedUrl}`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-blue-500 hover:bg-blue-600 text-white transition-all" aria-label="Share on Twitter">
+            <a href={`https://twitter.com/intent/tweet?text=${encodedText}&url=${encodedUrl}`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-gradient-to-r from-[#E4B905] to-[#FFBF00] hover:from-[#FFBF00] hover:to-[#FFC517] text-white transition-all duration-300 shadow-lg hover:shadow-xl" aria-label="Share on Twitter">
               <Twitter className="w-5 h-5" />
             </a>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 113d28d and 19ca2d0.

📒 Files selected for processing (1)
  • components/footer.tsx (2 hunks)
🔇 Additional comments (1)
components/footer.tsx (1)

67-84: Add rel="noopener noreferrer" to share link anchors.

The share buttons use native <a> tags with target="_blank" but are missing the rel="noopener noreferrer" attribute, creating a security vulnerability.

Apply this diff (note: also includes the fix from the URL encoding comment):

-            <a href={`https://twitter.com/intent/tweet?text=Check out Stable Viewpoints!&url=${currentUrl}`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-blue-500 hover:bg-blue-600 text-white transition-all" aria-label="Share on Twitter">
+            <a href={`https://twitter.com/intent/tweet?text=${encodedText}&url=${encodedUrl}`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-blue-500 hover:bg-blue-600 text-white transition-all" aria-label="Share on Twitter">
               <Twitter className="w-5 h-5" />
             </a>
 
             {/* LinkedIn Share */}
-            <a href={`https://www.linkedin.com/sharing/share-offsite/?url=${currentUrl}`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-blue-700 hover:bg-blue-800 text-white transition-all" aria-label="Share on LinkedIn">
+            <a href={`https://www.linkedin.com/sharing/share-offsite/?url=${encodedUrl}`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-blue-700 hover:bg-blue-800 text-white transition-all" aria-label="Share on LinkedIn">
               <LinkedInIcon />
             </a>
 
             {/* Telegram Share */}
-            <a href={`https://t.me/share/url?url=${currentUrl}&text=Check out Stable Viewpoints!`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-blue-400 hover:bg-blue-500 text-white transition-all" aria-label="Share on Telegram">
+            <a href={`https://t.me/share/url?url=${encodedUrl}&text=${encodedText}`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-blue-400 hover:bg-blue-500 text-white transition-all" aria-label="Share on Telegram">
               <TelegramIcon />
             </a>

Likely an incorrect or invalid review comment.

Comment on lines +26 to +27
const currentUrl = typeof window !== 'undefined' ? window.location.href : ''

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 | 🟠 Major

Potential SSR hydration mismatch.

Reading window.location.href directly in the component body can cause hydration mismatches in Next.js. The server renders with an empty string while the client hydrates with the actual URL, which may trigger React warnings.

Use a client-side effect to safely capture the URL after mount:

+import { useEffect, useState } from 'react'
+
 export default function Footer() {
-  const currentUrl = typeof window !== 'undefined' ? window.location.href : ''
+  const [currentUrl, setCurrentUrl] = useState('')
+
+  useEffect(() => {
+    setCurrentUrl(window.location.href)
+  }, [])

Alternatively, use Next.js router:

+import { useRouter } from 'next/router'
+
 export default function Footer() {
+  const router = useRouter()
+  const currentUrl = typeof window !== 'undefined' 
+    ? `${window.location.origin}${router.asPath}` 
+    : ''

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In components/footer.tsx around lines 26-27, reading window.location.href during
render causes SSR/client hydration mismatch; change to capture the URL only on
the client (after mount) or via Next.js router: move the window access into a
useEffect (set state with the URL) or use useRouter().asPath (or base URL
derived from router) so server renders match client and prevent hydration
warnings.

Comment on lines +47 to 58
<Link href="https://t.me/StabilityNexus" target="_blank" className="p-3 rounded-full bg-gradient-to-r from-[#228B22] to-[#5A981A] hover:from-[#3E921E] hover:to-[#91A511] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="Telegram">
<TelegramIcon />
</Link>
<Link
href="https://discord.gg/fuuWX4AbJt"
target="_blank"
className="p-3 rounded-full bg-gradient-to-r from-[#91A511] to-[#ADAC0D] hover:from-[#ADAC0D] hover:to-[#C8B209] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5"
aria-label="Discord"
>
<Link href="https://discord.gg/fuuWX4AbJt" target="_blank" className="p-3 rounded-full bg-gradient-to-r from-[#91A511] to-[#ADAC0D] hover:from-[#ADAC0D] hover:to-[#C8B209] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="Discord">
<DiscordIcon />
</Link>
<Link
href="https://www.linkedin.com/company/stability-nexus/"
target="_blank"
className="p-3 rounded-full bg-gradient-to-r from-[#C8B209] to-[#E4B905] hover:from-[#E4B905] hover:to-[#FFBF00] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5"
aria-label="LinkedIn"
>
<Link href="https://www.linkedin.com/company/stability-nexus/" target="_blank" className="p-3 rounded-full bg-gradient-to-r from-[#C8B209] to-[#E4B905] hover:from-[#E4B905] hover:to-[#FFBF00] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="LinkedIn">
<LinkedInIcon />
</Link>
<Link
href="https://twitter.com/StabilityNexus"
target="_blank"
className="p-3 rounded-full bg-gradient-to-r from-[#E4B905] to-[#FFBF00] hover:from-[#FFBF00] hover:to-[#FFC517] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5"
aria-label="Twitter"
>
<Link href="https://twitter.com/StabilityNexus" target="_blank" className="p-3 rounded-full bg-gradient-to-r from-[#E4B905] to-[#FFBF00] hover:from-[#FFBF00] hover:to-[#FFC517] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="Twitter">
<Twitter className="w-5 h-5" />
</Link>
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 | 🟠 Major

Add rel="noopener noreferrer" to external links for security.

All target="_blank" links should include rel="noopener noreferrer" to prevent tab-nabbing vulnerabilities and avoid passing referrer information unnecessarily.

Apply this diff:

-              <Link href="https://t.me/StabilityNexus" target="_blank" className="p-3 rounded-full bg-gradient-to-r from-[#228B22] to-[#5A981A] hover:from-[#3E921E] hover:to-[#91A511] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="Telegram">
+              <Link href="https://t.me/StabilityNexus" target="_blank" rel="noopener noreferrer" className="p-3 rounded-full bg-gradient-to-r from-[#228B22] to-[#5A981A] hover:from-[#3E921E] hover:to-[#91A511] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="Telegram">
                 <TelegramIcon />
               </Link>
-              <Link href="https://discord.gg/fuuWX4AbJt" target="_blank" className="p-3 rounded-full bg-gradient-to-r from-[#91A511] to-[#ADAC0D] hover:from-[#ADAC0D] hover:to-[#C8B209] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="Discord">
+              <Link href="https://discord.gg/fuuWX4AbJt" target="_blank" rel="noopener noreferrer" className="p-3 rounded-full bg-gradient-to-r from-[#91A511] to-[#ADAC0D] hover:from-[#ADAC0D] hover:to-[#C8B209] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="Discord">
                 <DiscordIcon />
               </Link>
-              <Link href="https://www.linkedin.com/company/stability-nexus/" target="_blank" className="p-3 rounded-full bg-gradient-to-r from-[#C8B209] to-[#E4B905] hover:from-[#E4B905] hover:to-[#FFBF00] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="LinkedIn">
+              <Link href="https://www.linkedin.com/company/stability-nexus/" target="_blank" rel="noopener noreferrer" className="p-3 rounded-full bg-gradient-to-r from-[#C8B209] to-[#E4B905] hover:from-[#E4B905] hover:to-[#FFBF00] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="LinkedIn">
                 <LinkedInIcon />
               </Link>
-              <Link href="https://twitter.com/StabilityNexus" target="_blank" className="p-3 rounded-full bg-gradient-to-r from-[#E4B905] to-[#FFBF00] hover:from-[#FFBF00] hover:to-[#FFC517] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="Twitter">
+              <Link href="https://twitter.com/StabilityNexus" target="_blank" rel="noopener noreferrer" className="p-3 rounded-full bg-gradient-to-r from-[#E4B905] to-[#FFBF00] hover:from-[#FFBF00] hover:to-[#FFC517] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="Twitter">
                 <Twitter className="w-5 h-5" />
               </Link>
📝 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
<Link href="https://t.me/StabilityNexus" target="_blank" className="p-3 rounded-full bg-gradient-to-r from-[#228B22] to-[#5A981A] hover:from-[#3E921E] hover:to-[#91A511] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="Telegram">
<TelegramIcon />
</Link>
<Link
href="https://discord.gg/fuuWX4AbJt"
target="_blank"
className="p-3 rounded-full bg-gradient-to-r from-[#91A511] to-[#ADAC0D] hover:from-[#ADAC0D] hover:to-[#C8B209] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5"
aria-label="Discord"
>
<Link href="https://discord.gg/fuuWX4AbJt" target="_blank" className="p-3 rounded-full bg-gradient-to-r from-[#91A511] to-[#ADAC0D] hover:from-[#ADAC0D] hover:to-[#C8B209] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="Discord">
<DiscordIcon />
</Link>
<Link
href="https://www.linkedin.com/company/stability-nexus/"
target="_blank"
className="p-3 rounded-full bg-gradient-to-r from-[#C8B209] to-[#E4B905] hover:from-[#E4B905] hover:to-[#FFBF00] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5"
aria-label="LinkedIn"
>
<Link href="https://www.linkedin.com/company/stability-nexus/" target="_blank" className="p-3 rounded-full bg-gradient-to-r from-[#C8B209] to-[#E4B905] hover:from-[#E4B905] hover:to-[#FFBF00] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="LinkedIn">
<LinkedInIcon />
</Link>
<Link
href="https://twitter.com/StabilityNexus"
target="_blank"
className="p-3 rounded-full bg-gradient-to-r from-[#E4B905] to-[#FFBF00] hover:from-[#FFBF00] hover:to-[#FFC517] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5"
aria-label="Twitter"
>
<Link href="https://twitter.com/StabilityNexus" target="_blank" className="p-3 rounded-full bg-gradient-to-r from-[#E4B905] to-[#FFBF00] hover:from-[#FFBF00] hover:to-[#FFC517] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="Twitter">
<Twitter className="w-5 h-5" />
</Link>
<Link href="https://t.me/StabilityNexus" target="_blank" rel="noopener noreferrer" className="p-3 rounded-full bg-gradient-to-r from-[#228B22] to-[#5A981A] hover:from-[#3E921E] hover:to-[#91A511] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="Telegram">
<TelegramIcon />
</Link>
<Link href="https://discord.gg/fuuWX4AbJt" target="_blank" rel="noopener noreferrer" className="p-3 rounded-full bg-gradient-to-r from-[#91A511] to-[#ADAC0D] hover:from-[#ADAC0D] hover:to-[#C8B209] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="Discord">
<DiscordIcon />
</Link>
<Link href="https://www.linkedin.com/company/stability-nexus/" target="_blank" rel="noopener noreferrer" className="p-3 rounded-full bg-gradient-to-r from-[#C8B209] to-[#E4B905] hover:from-[#E4B905] hover:to-[#FFBF00] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="LinkedIn">
<LinkedInIcon />
</Link>
<Link href="https://twitter.com/StabilityNexus" target="_blank" rel="noopener noreferrer" className="p-3 rounded-full bg-gradient-to-r from-[#E4B905] to-[#FFBF00] hover:from-[#FFBF00] hover:to-[#FFC517] text-white transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" aria-label="Twitter">
<Twitter className="w-5 h-5" />
</Link>
🤖 Prompt for AI Agents
In components/footer.tsx around lines 47 to 58, each external Link uses
target="_blank" but lacks rel="noopener noreferrer"; update every Link that
opens in a new tab to include rel="noopener noreferrer" (e.g., add rel="noopener
noreferrer" alongside target="_blank" on the Telegram, Discord, LinkedIn, and
Twitter Link components) to prevent tab-nabbing and avoid leaking referrer
information.

Comment on lines +67 to +84
<a href={`https://twitter.com/intent/tweet?text=Check out Stable Viewpoints!&url=${currentUrl}`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-blue-500 hover:bg-blue-600 text-white transition-all" aria-label="Share on Twitter">
<Twitter className="w-5 h-5" />
</a>

{/* LinkedIn Share */}
<a href={`https://www.linkedin.com/sharing/share-offsite/?url=${currentUrl}`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-blue-700 hover:bg-blue-800 text-white transition-all" aria-label="Share on LinkedIn">
<LinkedInIcon />
</a>

{/* Telegram Share */}
<a href={`https://t.me/share/url?url=${currentUrl}&text=Check out Stable Viewpoints!`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-blue-400 hover:bg-blue-500 text-white transition-all" aria-label="Share on Telegram">
<TelegramIcon />
</a>

{/* Discord Share */}
<a href={`https://discord.com/channels/@me`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-indigo-500 hover:bg-indigo-600 text-white transition-all" aria-label="Share on Discord">
<DiscordIcon />
</a>
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 | 🔴 Critical

Missing URL encoding causes broken share links.

The currentUrl is interpolated directly into share URLs without encoding. If the URL contains query parameters or special characters (e.g., ?, &, =), the share links will malform and fail.

Apply this diff to encode the URL:

+            const encodedUrl = encodeURIComponent(currentUrl)
+            const encodedText = encodeURIComponent('Check out Stable Viewpoints!')
+
             {/* Twitter Share */}
-            <a href={`https://twitter.com/intent/tweet?text=Check out Stable Viewpoints!&url=${currentUrl}`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-blue-500 hover:bg-blue-600 text-white transition-all" aria-label="Share on Twitter">
+            <a href={`https://twitter.com/intent/tweet?text=${encodedText}&url=${encodedUrl}`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-blue-500 hover:bg-blue-600 text-white transition-all" aria-label="Share on Twitter">
               <Twitter className="w-5 h-5" />
             </a>
 
             {/* LinkedIn Share */}
-            <a href={`https://www.linkedin.com/sharing/share-offsite/?url=${currentUrl}`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-blue-700 hover:bg-blue-800 text-white transition-all" aria-label="Share on LinkedIn">
+            <a href={`https://www.linkedin.com/sharing/share-offsite/?url=${encodedUrl}`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-blue-700 hover:bg-blue-800 text-white transition-all" aria-label="Share on LinkedIn">
               <LinkedInIcon />
             </a>
 
             {/* Telegram Share */}
-            <a href={`https://t.me/share/url?url=${currentUrl}&text=Check out Stable Viewpoints!`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-blue-400 hover:bg-blue-500 text-white transition-all" aria-label="Share on Telegram">
+            <a href={`https://t.me/share/url?url=${encodedUrl}&text=${encodedText}`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-blue-400 hover:bg-blue-500 text-white transition-all" aria-label="Share on Telegram">
               <TelegramIcon />
             </a>

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In components/footer.tsx around lines 67 to 84, the share links interpolate
currentUrl directly which can break when the URL contains query params or
special characters; update each share href to URL-encode currentUrl using
encodeURIComponent(currentUrl) (and URL-encode any query text like the
tweet/telegram text where applicable) so the generated share URLs are valid and
safe; ensure you replace the raw ${currentUrl} with the encoded value in all
four anchors and keep existing target/rel/aria attributes unchanged.

Comment on lines +82 to +84
<a href={`https://discord.com/channels/@me`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-indigo-500 hover:bg-indigo-600 text-white transition-all" aria-label="Share on Discord">
<DiscordIcon />
</a>
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 | 🟠 Major

Discord "share" button doesn't actually share content.

Discord doesn't provide a web-based share URL like other platforms. The current link (https://discord.com/channels/@me) only opens the user's DMs without sharing any content, which creates a misleading user experience.

Consider one of these alternatives:

  1. Remove the Discord share button (recommended) since Discord doesn't support web-based sharing.
  2. Copy URL to clipboard with a toast notification when clicked.
  3. Add explanatory text that the user needs to manually paste the link in Discord.

If you choose option 2, here's an example implementation:

-            {/* Discord Share */}
-            <a href={`https://discord.com/channels/@me`} target="_blank" rel="noopener noreferrer" className="p-2 rounded-full bg-indigo-500 hover:bg-indigo-600 text-white transition-all" aria-label="Share on Discord">
+            {/* Discord - Copy to Clipboard */}
+            <button onClick={() => navigator.clipboard.writeText(currentUrl)} className="p-2 rounded-full bg-indigo-500 hover:bg-indigo-600 text-white transition-all" aria-label="Copy link for Discord">
               <DiscordIcon />
-            </a>
+            </button>

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In components/footer.tsx around lines 82 to 84, the Discord "share" anchor
currently points to https://discord.com/channels/@me which does not share
content and is misleading; remove the Discord share button entirely
(recommended) by deleting the anchor and <DiscordIcon /> markup, or
alternatively replace the anchor with a button that copies the current page URL
to the clipboard and triggers a toast notification on success/failure (ensure to
prevent default link behavior, use navigator.clipboard.writeText, handle errors,
and provide accessible aria-label and keyboard support).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant