Skip to content

Commit 7878c79

Browse files
committed
Update
1 parent 6f5ea7b commit 7878c79

File tree

9 files changed

+48
-15
lines changed

9 files changed

+48
-15
lines changed

app/(home)/loading.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { CgSpinner } from 'react-icons/cg';
2+
3+
const loading = () => {
4+
return (
5+
<div className="grid min-h-[calc(100vh-7.5rem)] place-items-center">
6+
{/* <CgSpinner className="animate-spin text-5xl md:text-6xl" /> */}
7+
<img className='w-24 md:w-32' src="/loading.gif" alt="loader" />
8+
</div>
9+
);
10+
};
11+
12+
export default loading;

app/(home)/page.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import GridContainer from '@/components/GridContainer';
77
import { unstable_noStore as noStore } from 'next/cache';
88
import Header from '@/components/Header';
99

10+
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
11+
1012
export default async function Home() {
1113
noStore();
1214
await connectDb();
@@ -23,7 +25,7 @@ export default async function Home() {
2325
<Header />
2426

2527
<main className="px-4">
26-
<div className="mx-auto max-w-screen-md pt-[15vh] text-center md:pt-[12vh]">
28+
<div className="mx-auto max-w-screen-md text-center pt-[10vh]">
2729
<h1 className="text-gradient text-4xl font-bold md:text-7xl">Git Glance</h1>
2830
<p className="text-gradient mb-16 mt-2 text-xl font-medium md:text-3xl ">
2931
Visualize Your GitHub Profile

app/[username]/RecentActivity.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const RecentActivity = ({ activity }) => {
9494
<GridContainer name="Recent Activity" className={'grid-cols-1 md:grid-cols-1'}>
9595
{activity.map((event, i) => {
9696
return (
97-
<div className="box overflow-hidden text-left hover:scale-100">
97+
<div key={i} className="box overflow-hidden text-left hover:scale-100">
9898
<p className="text-sm text-gray-400">{new Date(event.timestamp).toLocaleString()}</p>
9999

100100
<div className="mt-2.5 font-medium text-gray-200 text-sm md:text-lg [&_a]:text-cyan-500 [&_a]:hover:underline">

app/[username]/UserInfo.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const UserInfo = props => {
1919

2020
<div className="flex h-full flex-col text-center md:text-left">
2121
<h2 className="text-gradient text-4xl font-bold md:text-6xl">{props.name || props.username}</h2>
22-
<h4 className="-mt-1 text-gray-400 md:mb-1 md:text-3xl">@{props.username}</h4>
22+
<h3 className="-mt-1 text-gray-400 md:mb-1 md:text-3xl">@{props.username}</h3>
2323

2424
<p className="mb-3 flex items-center justify-center md:justify-start gap-2">
2525
<FaCalendar />

app/[username]/page.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const page = async ({ params: { username } }) => {
6666
} = await fetchUserData(username);
6767

6868
return (
69-
<main className="mx-auto max-w-screen-xl space-y-8 px-3 pb-10 -mt-8 md:space-y-16">
69+
<main className="mx-auto max-w-screen-xl space-y-8 px-3 pb-10 md:space-y-16">
7070
<RateLimit />
7171
<UserInfo username={username} {...userInfo} />
7272
<Stats stats={userStats} />

app/layout.js

+26-8
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,42 @@
11
import './globals.scss';
2-
import GithubCorner from '@/components/GithubCorner';
32
import ParticlesJs from '@/components/ParticlesJs';
43
import ChartInit from '@/components/ChartInit';
54
import { GoogleAnalytics } from '@next/third-parties/google';
65
import Footer from '@/components/Footer';
7-
import RateLimit from '@/components/RateLimit';
8-
import Header from '@/components/Header';
96

107
export const metadata = {
8+
metadataBase: new URL(process.env.BASE_URL),
119
title: 'GitHub Profile Visualizer',
1210
description:
1311
'Gain valuable insights into your GitHub profile effortlessly. Explore your coding journey with intuitive visualizations and unlock a deeper understanding of your contributions, repositories, and activity. Dive into your GitHub universe with ease and clarity.',
12+
keywords: [
13+
'GitHub Profile Visualizer',
14+
'GitHub Profile Analyzer',
15+
'GitHub Profile Insights',
16+
'GitHub Profile Stats',
17+
'GitHub Profile Summary',
18+
'GitHub Profile Overview',
19+
'GitHub Profile Analysis',
20+
],
1421
openGraph: {
1522
title: 'Git Glance',
16-
images: `${process.env.BASE_URL}/banner.png`,
23+
images: `/banner.png`,
1724
icons: {
18-
icon: '/favicon.ico',
25+
icon: `/favicon.ico`,
1926
},
27+
type: 'website',
28+
},
29+
alternates: {
30+
canonical: '/',
31+
},
32+
manifest: '/site.webmanifest',
33+
creator: 'devxprite',
34+
};
35+
36+
export const viewport = {
37+
colorScheme: 'dark',
38+
verification: {
39+
google: 'koBxrTJwnDsFGPdjUesKqkWAgmhsZyvWWlDkwv4cOpw',
2040
},
2141
};
2242

@@ -47,12 +67,10 @@ export default function RootLayout({ children }) {
4767
<html lang="en">
4868
<GoogleAnalytics gaId="G-C2EK8WWR4Y" />
4969
<head>
50-
<meta name="google-site-verification" content="koBxrTJwnDsFGPdjUesKqkWAgmhsZyvWWlDkwv4cOpw" />
51-
<meta name="color-scheme" content="dark" />
70+
<meta name="thumbnail" content={`${process.env.BASE_URL}/banner.png`} />
5271
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
5372
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
5473
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
55-
<link rel="manifest" href="/site.webmanifest" />
5674
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }} />
5775
</head>
5876

app/loading.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import { CgSpinner } from 'react-icons/cg';
22

33
const loading = () => {
44
return (
5-
<div className="grid min-h-[calc(100vh-6rem)] place-items-center">
6-
<CgSpinner className="animate-spin text-5xl md:text-6xl" />
5+
<div className="grid min-h-[calc(100vh-7.5rem)] place-items-center">
6+
{/* <CgSpinner className="animate-spin text-5xl md:text-6xl" /> */}
7+
<img className='w-28 md:w-32' src="/loading.gif" alt="loader" />
78
</div>
89
);
910
};

components/RateLimit.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const RateLimit = async () => {
2020
const { rateLimit } = await githubGraphql({ query });
2121

2222
return (
23-
<div className="fixed bottom-0 right-0 z-20 border border-gray-700 bg-gray-800 px-3 md:px-4 py-2 text-xs shadow-xl shadow-gray-900 md:bottom-8 md:right-6 md:text-sm">
23+
<div className="fixed bottom-0 right-0 hidden md:block z-20 border border-gray-700 bg-gray-800 px-3 md:px-4 py-2 text-xs shadow-xl shadow-gray-900 md:bottom-8 md:right-6 md:text-sm">
2424
<p>
2525
<span className=" text-sm font-bold md:text-base">{rateLimit.remaining}</span> requests left <br />{' '}
2626
before rate-limit

public/loading.gif

17.8 KB
Loading

0 commit comments

Comments
 (0)