From e4eee81a7b58996941632f420a95f0c2ada56578 Mon Sep 17 00:00:00 2001 From: anandmindfire Date: Mon, 14 Apr 2025 14:46:01 +0530 Subject: [PATCH 1/2] fix: update project fetching query --- updateProject.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/updateProject.mjs b/updateProject.mjs index 1b0eee0f..49e0fd56 100644 --- a/updateProject.mjs +++ b/updateProject.mjs @@ -112,7 +112,10 @@ async function updateProjects() { headers: { "Content-Type": "application/json" }, body: JSON.stringify({ query: `query getCurrentProjects { - foss_projects(filter: {project_type: { _eq: "current" }}) { + foss_projects(filter: { _and: [ + { project_type: { _eq: "current" }}, + { status: { _eq: "published" }} + ]}) { id, title, short_description, From 3f9498b99fc11ba2459e633e2c796a3b332e9973 Mon Sep 17 00:00:00 2001 From: anandmindfire Date: Mon, 14 Apr 2025 14:47:54 +0530 Subject: [PATCH 2/2] fix: update project fetching query status published --- src/app/projects/components/ProjectCard.tsx | 80 ++++++++++++--------- 1 file changed, 46 insertions(+), 34 deletions(-) diff --git a/src/app/projects/components/ProjectCard.tsx b/src/app/projects/components/ProjectCard.tsx index 3d99c630..f2d6ba66 100644 --- a/src/app/projects/components/ProjectCard.tsx +++ b/src/app/projects/components/ProjectCard.tsx @@ -1,7 +1,7 @@ -'use client' +"use client"; import Link from "next/link"; import React from "react"; -import {useState} from 'react'; +import { useState } from "react"; import github from "../../../../public/images/social-media/github.png"; import docs from "../../../../public/images/social-media/docs.svg"; import Image from "next/image"; @@ -28,7 +28,7 @@ export default function ProjectCard({ }: Props) { const [showAllTags, setShowAllTags] = useState(false); const [expandDescription, setExpandDescription] = useState(false); - + return (
{/* Top content section */} @@ -44,44 +44,52 @@ export default function ProjectCard({
)} - + {/*Description that expands on click */} -
setExpandDescription(!expandDescription)} > -

+

{shortDescription}

{expandDescription && ( - less + less )}
- + {parentTitle !== "Upcoming Projects" && tags && tags.length > 0 && (
-
- {showAllTags ? ( - tags.map((tag, index) => ( - - {tag} - - )) - ) : ( - tags.slice(0, 2).map((tag, index) => ( - - {tag} - - )) - )} +
+ {showAllTags + ? tags.map((tag, index) => ( + + {tag} + + )) + : tags.slice(0, 2).map((tag, index) => ( + + {tag} + + ))} {!showAllTags && tags.length > 2 && ( - )} {showAllTags && ( -
)}
- + {/* Footer section */} {parentTitle !== "Upcoming Projects" && (githubUrl || documentationUrl) && @@ -136,7 +144,12 @@ export default function ProjectCard({ target='_blank' className='flex items-center gap-2 px-3 py-1.5 rounded-full bg-gray-100 hover:bg-gray-200 transition-colors' > - Documentation + Documentation Docs )} @@ -145,5 +158,4 @@ export default function ProjectCard({ )}
); - }