Skip to content

Commit ae1c83a

Browse files
committed
fixed bug issue #249
1 parent ab9a2cb commit ae1c83a

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

components/aboutUs.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import {useState, useEffect} from "react";
33
import {BallTriangle} from "react-loader-spinner";
44
import {SiBuymeacoffee} from "react-icons/si";
5+
import GitStats from "../components/gitstats";
56
import Link from "next/link";
67

78
const AboutUs = () => {
@@ -119,6 +120,7 @@ const AboutUs = () => {
119120
<p className=" mt-8 mb-8 text-xl text-white underline underline-offset-4">
120121
Our Contributers 🥂
121122
</p>
123+
<GitStats className="!top-0 !left-0 !relative !mb-10 max-w-md9: !flex" />
122124
<div
123125
id="contributors"
124126
className="overflow-auto whitespace-nowrap w-auto flex flex-wrap justify-evenly gap-1 md:gap-8"></div>

components/gitstats.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@
22
import React from "react";
33
import {TbGitFork} from "react-icons/tb";
44
import {BsStarFill} from "react-icons/bs";
5-
5+
import cn from 'classnames';
66
import useSWR from "swr";
77

88
async function fetcher(...arg) {
99
const res = await fetch(...arg);
1010

1111
return res.json();
1212
}
13-
const GitStats = () => {
13+
const GitStats = (props) => {
14+
const {className} = props;
1415
const {data} = useSWR("/api/github", fetcher);
1516

1617
return (
1718
<a
18-
className="gitstats_box"
19+
className={cn("gitstats_box", className)}
1920
href="https://github.com/jsvigneshkanna/tailwind_ui_components"
2021
target="__blank">
2122
<div className="gitstats_fork">

package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"dependencies": {
1212
"@octokit/rest": "^19.0.5",
13+
"classnames": "^2.3.2",
1314
"install-peerdeps": "^3.0.3",
1415
"next": "^12.3.1",
1516
"nextjs": "0.0.3",

0 commit comments

Comments
 (0)