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 Github link in Contributor #430

Merged
merged 3 commits into from
Jul 14, 2024
Merged
Changes from 1 commit
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
18 changes: 11 additions & 7 deletions frontend/src/pages/Contributors.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useEffect, useState } from 'react';
import axios from 'axios';
import bgHero from "../assets/bgHero.png";
import { FaGithub } from 'react-icons/fa';

interface Contributor {
id: number;
Expand Down Expand Up @@ -41,24 +42,27 @@ const Contributors: React.FC = () => {
key={contributor.id}
className="w-full md:w-1/3 lg:w-1/4 flex flex-col items-center bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-lg shadow-md p-4 transition-transform transform hover:scale-105 hover:shadow-xl"
>
<a
href={contributor.html_url}
className="block"
target="_blank"
rel="noopener noreferrer"
>
<img
src={contributor.avatar_url}
alt={contributor.login}
className="w-24 h-24 rounded-full object-cover mb-4"
/>
</a>
<h2 className="text-lg font-medium text-gray-900 dark:text-gray-100 mb-2">
{contributor.login}
</h2>
<p className="text-gray-700 dark:text-gray-400">
Contributions: {contributor.contributions}
</p>
<p className="text-gray-700 dark:text-gray-400 flex items-center">
<a
href={contributor.html_url}
className="flex items-center"
target="_blank"
rel="noopener noreferrer"
>
<FaGithub className="mr-1" /> GitHub Profile
</a>
</p>
</div>
))}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of moving the link to the github profile from the contributors image.
Make the whole card clickable so it's easier to redirect to user profile.

</div>
Expand Down
Loading