Skip to content

feat: Clickable Profile card and Our Project redirection to main repo#131

Merged
sanjay-kv merged 2 commits into
recodehive:mainfrom
harish599:main
Jun 20, 2025
Merged

feat: Clickable Profile card and Our Project redirection to main repo#131
sanjay-kv merged 2 commits into
recodehive:mainfrom
harish599:main

Conversation

@harish599

@harish599 harish599 commented Jun 20, 2025

Copy link
Copy Markdown
Contributor

for issues #128 and #127

@vercel

vercel Bot commented Jun 20, 2025

Copy link
Copy Markdown
Contributor

@harish599 is attempting to deploy a commit to the recode Team on Vercel.

A member of the Team first needs to authorize it.

@harish599 harish599 changed the title feat: Clickable Profile card feat: Clickable Profile card and Our Project redirection to main repo Jun 20, 2025
@sanjay-kv sanjay-kv requested a review from Copilot June 20, 2025 23:10
@vercel

vercel Bot commented Jun 20, 2025

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
recode-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2025 11:20pm

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces clickable interactions for the profile card on the homepage and the project tag in the OurProjects component, redirecting users to external URLs.

  • Added onClick handler and cursor style to the homepage profile card for redirection
  • Made the project tag in OurProjects clickable, linking to the GitHub repository

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/pages/index.tsx Wrapped profile image container in a clickable div
src/components/ourProjects.tsx Added onClick and cursor-pointer to the tag element

Comment thread src/pages/index.tsx
Comment thread src/pages/index.tsx
Comment on lines +61 to 70
<div
className="m-4"
onClick={() => (window.location.href = "https://www.sanjaykv.com/")}
>
<img
src="/selfhero.png"
alt="recodehive"
className="w-full h-full object-cover rounded-2xl"
className="w-full h-full object-cover rounded-2xl cursor-pointer"
/>
</div>

Copilot AI Jun 20, 2025

Copy link

Choose a reason for hiding this comment

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

Directly setting window.location.href bypasses SPA routing and may reload the entire app. Consider using Next.js or a routing utility to maintain client-side navigation.

Copilot uses AI. Check for mistakes.
Comment on lines +63 to 70
<div
className="cursor-pointer px-6 py-2 bg-gradient-to-r from-blue-500 to-purple-500 text-white rounded-full text-sm sm:text-base font-medium tracking-wide shadow-lg transform hover:scale-105 transition-transform duration-300"
onClick={() =>
(window.location.href = "https://github.com/recodehive")
}
>
{tag}
</div>

Copilot AI Jun 20, 2025

Copy link

Choose a reason for hiding this comment

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

Wrapping the tag in a clickable

without semantic elements or keyboard support can harm accessibility. Use an or , or add role="button", tabIndex, and keyboard event handlers.

Suggested change
<div
className="cursor-pointer px-6 py-2 bg-gradient-to-r from-blue-500 to-purple-500 text-white rounded-full text-sm sm:text-base font-medium tracking-wide shadow-lg transform hover:scale-105 transition-transform duration-300"
onClick={() =>
(window.location.href = "https://github.com/recodehive")
}
>
{tag}
</div>
<a
href="https://github.com/recodehive"
className="cursor-pointer px-6 py-2 bg-gradient-to-r from-blue-500 to-purple-500 text-white rounded-full text-sm sm:text-base font-medium tracking-wide shadow-lg transform hover:scale-105 transition-transform duration-300"
>
{tag}
</a>

Copilot uses AI. Check for mistakes.
Comment on lines +63 to 70
<div
className="cursor-pointer px-6 py-2 bg-gradient-to-r from-blue-500 to-purple-500 text-white rounded-full text-sm sm:text-base font-medium tracking-wide shadow-lg transform hover:scale-105 transition-transform duration-300"
onClick={() =>
(window.location.href = "https://github.com/recodehive")
}
>
{tag}
</div>

Copilot AI Jun 20, 2025

Copy link

Choose a reason for hiding this comment

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

Manipulating window.location.href directly triggers a full page reload. Consider using a proper link component or routing helper to preserve single-page app behavior.

Suggested change
<div
className="cursor-pointer px-6 py-2 bg-gradient-to-r from-blue-500 to-purple-500 text-white rounded-full text-sm sm:text-base font-medium tracking-wide shadow-lg transform hover:scale-105 transition-transform duration-300"
onClick={() =>
(window.location.href = "https://github.com/recodehive")
}
>
{tag}
</div>
<a
href="https://github.com/recodehive"
target="_blank"
rel="noopener noreferrer"
className="cursor-pointer px-6 py-2 bg-gradient-to-r from-blue-500 to-purple-500 text-white rounded-full text-sm sm:text-base font-medium tracking-wide shadow-lg transform hover:scale-105 transition-transform duration-300"
>
{tag}
</a>

Copilot uses AI. Check for mistakes.
@sanjay-kv

Copy link
Copy Markdown
Member

Thanks @harish599

@sanjay-kv sanjay-kv merged commit 2a7f87a into recodehive:main Jun 20, 2025
1 check passed
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.

3 participants