diff --git a/public/logo.png b/public/logo.png index 9014853..af0314a 100644 Binary files a/public/logo.png and b/public/logo.png differ diff --git a/src/app/api/contribs/route.ts b/src/app/api/contribs/route.ts new file mode 100644 index 0000000..a107556 --- /dev/null +++ b/src/app/api/contribs/route.ts @@ -0,0 +1,34 @@ +import { NextRequest, NextResponse } from "next/server"; + +export async function GET(req: NextRequest) { + const username = "kleo-dev"; + const token = process.env.GITHUB_TOKEN; + + const query = ` + query { + user(login: "${username}") { + contributionsCollection { + contributionCalendar { + totalContributions + } + } + } + } + `; + + const response = await fetch("https://api.github.com/graphql", { + method: "POST", + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + body: JSON.stringify({ query }), + }); + + const data = await response.json(); + const total = + data.data.user.contributionsCollection.contributionCalendar + .totalContributions; + + return NextResponse.json({ total }, { status: 200 }); +} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index e52aaa9..7db9358 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -17,9 +17,7 @@ export default function RootLayout({
A 15 year old Software Engineer from Tirane, Albania, with 6 years of experience, specializing in full-stack web development, desktop - applications, TUI apps, and hacking. I also have a deep interest in - low-level programming. + applications, TUI apps, and hacking. I also have a deep interest + in low-level programming.
{/* Socials and skill */} @@ -35,8 +50,7 @@ export default function App() {
+ {e.toString()}
- ); + return{e.toString()}
; } } diff --git a/src/components/Skill.tsx b/src/components/Skill.tsx index b9158b1..de9fc89 100644 --- a/src/components/Skill.tsx +++ b/src/components/Skill.tsx @@ -17,13 +17,12 @@ export default function Skill({ bg-black text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity duration-300 whitespace-nowrap" > - Skilled in {" "} {skill} + Skilled in {skill}