Skip to content

Conversation

@ssid18
Copy link

@ssid18 ssid18 commented Jan 3, 2026

Summary

This PR makes the project link label in the Projects section clickable when a valid link.href is provided in the project data.

Changes

  • Renders the project link label as an anchor (<a>) when a valid href is present.
  • Keeps placeholder links (href === '#') non-interactive.
  • Preserves existing layout, styling, and typography.

Motivation

The Projects cards currently display a link icon and label that appears interactive but does not navigate anywhere. This change improves usability by aligning visual affordances with actual behavior.

This keeps the UI behavior consistent with user expectations while leveraging existing data without introducing additional logic or dependencies.

Scope

  • UI-only change
  • No changes to project data, ordering, or styling
  • No impact on build or deployment configuration

Testing

Verified locally by running the app and confirming that project links with valid URLs navigate correctly, while placeholder links remain non-interactive.

Summary by CodeRabbit

  • Bug Fixes
    • Improved project link display. Valid URLs now render as clickable links that open in a new tab with proper accessibility features and hover styling. Invalid or missing URLs appear as disabled, non-interactive elements.

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

@vercel
Copy link

vercel bot commented Jan 3, 2026

@ssid18 is attempting to deploy a commit to the AOSSIE Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Jan 3, 2026

📝 Walkthrough

Walkthrough

The CardActions component in projects.jsx now conditionally renders links based on URL validity. Valid links display as clickable anchors with new tab behavior and accessibility attributes, while invalid or missing links render as disabled text with consistent styling.

Changes

Cohort / File(s) Summary
Conditional Link Rendering
src/pages/projects.jsx
Modified CardActions to conditionally render: anchor element with rel="noopener noreferrer" and target="_blank" when project.link.href exists and is not '#', otherwise renders disabled paragraph. Adds accessibility label and hover styling to active links.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A link that was stuck in the dark,
Now hops to destinations with spark!
Valid URLs shine bright,
While broken ones rest right,
This polish adds function—a lark! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately summarizes the main change: making project links clickable by rendering them as anchor elements when valid URLs are provided.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

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

@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: 1

🧹 Nitpick comments (1)
src/pages/projects.jsx (1)

98-98: Consider adding cursor styling for non-interactive links.

The disabled state paragraph could benefit from explicit cursor styling (cursor-default or cursor-not-allowed) to provide a clearer visual indication that the element is non-interactive, beyond just the muted color.

🔎 Suggested enhancement
-                <p className="relative z-10 mt-6 flex items-center text-md font-semibold font-mono text-zinc-400 dark:text-zinc-500">
+                <p className="relative z-10 mt-6 flex items-center text-md font-semibold font-mono text-zinc-400 dark:text-zinc-500 cursor-default">
                  <LinkIcon className="h-6 w-6 flex-none scale-110" />
                  <span className="ml-2">{project.link?.label}</span>
                </p>
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dfb8668 and 532d836.

📒 Files selected for processing (1)
  • src/pages/projects.jsx

Comment on lines +86 to +102
{project.link?.href && project.link.href !== '#' ? (
<a
href={project.link.href}
target="_blank"
rel="noopener noreferrer"
className="relative z-10 mt-6 flex items-center text-md font-semibold font-mono text-zinc-600 transition hover:text-[#00843D] dark:hover:text-yellow-400 dark:text-zinc-200"
aria-label={`Open ${project.name} project`}
>
<LinkIcon className="h-6 w-6 flex-none scale-110" />
<span className="ml-2">{project.link.label}</span>
</a>
) : (
<p className="relative z-10 mt-6 flex items-center text-md font-semibold font-mono text-zinc-400 dark:text-zinc-500">
<LinkIcon className="h-6 w-6 flex-none scale-110" />
<span className="ml-2">{project.link.label}</span>
</p>
)}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's read the projects.jsx file to confirm the code
cat -n src/pages/projects.jsx | head -120

Repository: AOSSIE-Org/website

Length of output: 6236


🏁 Script executed:

# Search for where projects data is defined or imported
rg "projects\s*=" src/ -A 3 -B 1 --type js --type jsx

Repository: AOSSIE-Org/website

Length of output: 89


🏁 Script executed:

# Look for the projects data file/constant
fd "project" -e js -e jsx -e ts -e tsx | grep -v node_modules

Repository: AOSSIE-Org/website

Length of output: 107


🏁 Script executed:

cat src/helper/projects.js

Repository: AOSSIE-Org/website

Length of output: 3554


Apply optional chaining consistently for defensive programming.

The condition on line 86 uses optional chaining (project.link?.href), but lines 95 and 100 access project.link.label without it. While all current projects include a link object, this inconsistency violates defensive programming practices. If the data structure changes or a project lacks a link object, the else branch will throw a runtime error. Apply optional chaining on lines 95 and 100 to match the pattern established on line 86.

Suggested fix
                  <LinkIcon className="h-6 w-6 flex-none scale-110" />
-                  <span className="ml-2">{project.link.label}</span>
+                  <span className="ml-2">{project.link?.label}</span>

Apply the same change on line 100 in the else branch.

📝 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
{project.link?.href && project.link.href !== '#' ? (
<a
href={project.link.href}
target="_blank"
rel="noopener noreferrer"
className="relative z-10 mt-6 flex items-center text-md font-semibold font-mono text-zinc-600 transition hover:text-[#00843D] dark:hover:text-yellow-400 dark:text-zinc-200"
aria-label={`Open ${project.name} project`}
>
<LinkIcon className="h-6 w-6 flex-none scale-110" />
<span className="ml-2">{project.link.label}</span>
</a>
) : (
<p className="relative z-10 mt-6 flex items-center text-md font-semibold font-mono text-zinc-400 dark:text-zinc-500">
<LinkIcon className="h-6 w-6 flex-none scale-110" />
<span className="ml-2">{project.link.label}</span>
</p>
)}
{project.link?.href && project.link.href !== '#' ? (
<a
href={project.link.href}
target="_blank"
rel="noopener noreferrer"
className="relative z-10 mt-6 flex items-center text-md font-semibold font-mono text-zinc-600 transition hover:text-[#00843D] dark:hover:text-yellow-400 dark:text-zinc-200"
aria-label={`Open ${project.name} project`}
>
<LinkIcon className="h-6 w-6 flex-none scale-110" />
<span className="ml-2">{project.link?.label}</span>
</a>
) : (
<p className="relative z-10 mt-6 flex items-center text-md font-semibold font-mono text-zinc-400 dark:text-zinc-500">
<LinkIcon className="h-6 w-6 flex-none scale-110" />
<span className="ml-2">{project.link?.label}</span>
</p>
)}
🤖 Prompt for AI Agents
In src/pages/projects.jsx around lines 86 to 102, the code uses optional
chaining for project.link.href but accesses project.link.label directly on lines
95 and 100, which can throw if link is undefined; update those two accesses to
use optional chaining (project.link?.label) so both branches defensively
reference the label (optionally add a fallback like ?? '' if you prefer an
explicit empty string).

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