From c47ac966855b3cf056dbae00b668236c74a30af3 Mon Sep 17 00:00:00 2001 From: Saahil Date: Sat, 22 Jun 2024 15:55:51 -0400 Subject: [PATCH] Project fix --- src/components/Projects/index.tsx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/components/Projects/index.tsx b/src/components/Projects/index.tsx index 35f44ae4..8ce2d994 100644 --- a/src/components/Projects/index.tsx +++ b/src/components/Projects/index.tsx @@ -6,19 +6,20 @@ import { LuGitFork, LuGlobe } from "react-icons/lu" * @param param0 * @returns */ -export function Card({ title, description, image,alt, Badges, svn_link} : { +export function Card({ title, description, image,alt, Badges, svn_link, is_fork} : { title: string , description: string, image?: string, alt?: string, Badges?: any, - svn_link: string + svn_link: string, + is_fork: Boolean }) { return
{image ?
{alt
: null}
-

+

{is_fork ? : null} {title} {/*
NEW
*/}

@@ -49,14 +50,17 @@ const [translateY, setTranslateY] = useState(0) .then((data) => { - // console.log([...data[0], ...data[1]]) + console.log(data[0], data[1]) const idsThatAreFound:any = {} - const items = [...data[0], ...data[1]].filter(function(item, pos, self) { + const items = [...data[0], ...data[1]] + .filter(e => e.topics.includes('github-include-on-site')) + .filter(function(item, pos, self) { if(idsThatAreFound[item.id]) return false; idsThatAreFound[item.id] = true return true; }) - .filter(e => e.topics.includes('github-include-on-site')) + + console.log() console.log(items) //@ts-ignore setGithubData(items) @@ -75,7 +79,7 @@ const [translateY, setTranslateY] = useState(0) */}
{githubData.map((d: any) => { -return +return
@@ -85,7 +89,7 @@ return
{d.topics.filter((e:string) => !e.includes('github-include-on-site')).map((topic:string) => { - return
{topic}
+ return
{topic}
})}
}/>