Skip to content

Commit

Permalink
Removing bots from the contributors list.
Browse files Browse the repository at this point in the history
Signed-off-by: Tushar Saini <s2sharpit@gmail.com>
  • Loading branch information
s2sharpit committed Jul 8, 2023
1 parent cf5fec8 commit 2a5d343
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/app/contributors/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import ContributorCard from "@/components/ContributorCard";


async function getContributorData() {
// fetch contributors using Github REST API
const res = await fetch(
Expand All @@ -14,6 +15,7 @@ async function getContributorData() {
}

interface Card {
type: string;
id: number;
login: string;
html_url: string;
Expand All @@ -23,7 +25,8 @@ interface Card {

export default async function ContributorsPage() {
const contributorList = await getContributorData();

const filteredContributors = contributorList.filter((data: Card) => data.type !== "Bot");

return (
<>
<section className="container grid place-items-center p-8">
Expand All @@ -35,9 +38,9 @@ export default async function ContributorsPage() {
</p>
</div>
<div className="container mt-10 flex flex-wrap justify-center gap-8">
{contributorList.map((data: Card) => {
return <ContributorCard key={data.id} data={data} />;
})}
{filteredContributors.map((data: Card) => {
return <ContributorCard key={data.id} data={data} />;
})}
</div>
</section>
</>
Expand Down

0 comments on commit 2a5d343

Please sign in to comment.