-
Notifications
You must be signed in to change notification settings - Fork 202
Profile page feature #515
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
Open
pranav-gawande1
wants to merge
6
commits into
GitMetricsLab:main
Choose a base branch
from
pranav-gawande1:profile-page-feature
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Profile page feature #515
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
09f942b
Added [feature]: profile dropdown component
pranav-gawande1 46844bb
Added [feature]: added logout functionality
pranav-gawande1 11c3466
Added [feature]: updated the code as per review
pranav-gawande1 f14a114
Added [feature]: updated the code as per review for second time
pranav-gawande1 b7996a9
Added [feature]: updated the code as per review for third time
pranav-gawande1 04d73c2
Added [feature]: solved the conflicts
pranav-gawande1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| interface AchievementProps { | ||
| title: string | ||
| description: string | ||
| } | ||
|
|
||
| const AchievementCard = ({ | ||
| title, | ||
| description | ||
| }: AchievementProps) => { | ||
| return ( | ||
| <div className="rounded-xl border border-zinc-800 bg-zinc-900 p-5"> | ||
|
|
||
| <h3 className="text-lg font-semibold"> | ||
| {title} | ||
| </h3> | ||
|
|
||
| <p className="mt-2 text-sm text-zinc-400"> | ||
| {description} | ||
| </p> | ||
| </div> | ||
| ) | ||
| } | ||
|
|
||
| export default AchievementCard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| import { GitHubCalendar } from "react-github-calendar"; | ||
|
|
||
| interface UsernameProps { | ||
| username: string; | ||
| } | ||
|
|
||
| const calendarTheme = { | ||
| light: [ | ||
| "#ebedf0", | ||
| "#9be9a8", | ||
| "#40c463", | ||
| "#30a14e", | ||
| "#216e39", | ||
| ], | ||
| dark: [ | ||
| "#161b22", | ||
| "#0e4429", | ||
| "#006d32", | ||
| "#26a641", | ||
| "#39d353", | ||
| ], | ||
| }; | ||
|
|
||
| const ContributionHeatmap = ({ | ||
| username | ||
| }: UsernameProps) => { | ||
|
|
||
| if (!username) return null; | ||
|
|
||
| const themeMode = | ||
| typeof window !== "undefined" | ||
| ? localStorage.getItem("theme") | ||
| : "light"; | ||
|
|
||
| return ( | ||
|
|
||
| <div className="rounded-2xl border border-zinc-200 bg-white p-6 | ||
| dark:border-zinc-800 dark:bg-zinc-900"> | ||
|
|
||
| <h2 className="mb-4 text-xl font-semibold | ||
| text-zinc-700 dark:text-zinc-300"> | ||
|
|
||
| Contributions | ||
|
|
||
| </h2> | ||
|
|
||
| <div className="calendar-container overflow-x-auto pb-2 flex justify-center"> | ||
|
|
||
| <GitHubCalendar | ||
| username={username} | ||
| blockSize={12} | ||
| blockMargin={4} | ||
| fontSize={14} | ||
| theme={calendarTheme} | ||
| colorScheme={ | ||
| themeMode === "dark" | ||
| ? "dark" | ||
| : "light" | ||
| } | ||
| /> | ||
|
|
||
| </div> | ||
|
|
||
| </div> | ||
|
|
||
| ); | ||
| }; | ||
|
|
||
| export default ContributionHeatmap; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| interface LanguageChartProps { | ||
| languages: Record<string, number>; | ||
| } | ||
|
|
||
| const LanguageChart = ({ languages }: LanguageChartProps) => { | ||
| const total = Object.values(languages).reduce((sum, count) => sum + count, 0); | ||
| return ( | ||
| <div className="rounded-2xl border border-zinc-200 bg-white p-6 | ||
| dark:border-zinc-800 dark:bg-zinc-900"> | ||
|
|
||
| <h2 className="mb-4 text-xl font-semibold text-zinc-700 dark:text-zinc-300"> | ||
| Languages Used | ||
| </h2> | ||
| <div className="space-y-4"> | ||
|
|
||
| {Object.entries(languages) | ||
| .map(([language, count]) => { | ||
|
|
||
| const percentage = | ||
| total > 0 | ||
| ? Math.round((count / total) * 100) | ||
| : 0; | ||
|
|
||
| return ( | ||
|
|
||
| <div key={language} className="rounded-xl shadow-xl border-zinc-200 dark:border-zinc-800 p-2"> | ||
|
|
||
| <div className="mb-1 flex justify-between"> | ||
|
|
||
| <span className="text-zinc-700 dark:text-zinc-300"> | ||
| {language} | ||
| </span> | ||
|
|
||
| <span className="text-zinc-700 dark:text-zinc-300"> | ||
| {percentage}% | ||
| </span> | ||
|
|
||
| </div> | ||
|
|
||
| <div className="h-3 rounded-full bg-white dark:bg-zinc-900"> | ||
|
|
||
| <div | ||
| className="h-3 rounded-full bg-blue-500" | ||
| style={{ | ||
| width: `${percentage}%` | ||
| }} | ||
| /> | ||
|
|
||
| </div> | ||
|
|
||
| </div> | ||
|
|
||
| ); | ||
|
|
||
| })} | ||
|
|
||
| </div> | ||
| </div> | ||
| ) | ||
| } | ||
|
|
||
| export default LanguageChart |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.