diff --git a/src/api/project.ts b/src/api/project.ts index 8641e1d86..18647eabd 100644 --- a/src/api/project.ts +++ b/src/api/project.ts @@ -4,7 +4,7 @@ import { api } from './api.ts'; export function projectApi(context: APIContext) { return { listProjectsUserCount: async function (projectIds: string[]) { - return api(context).post>( + return api(context).post>( `${import.meta.env.PUBLIC_API_URL}/v1-list-projects-user-count`, { projectIds, diff --git a/src/components/Projects/ProjectCard.tsx b/src/components/Projects/ProjectCard.tsx index 844eee1e2..63d07dd9b 100644 --- a/src/components/Projects/ProjectCard.tsx +++ b/src/components/Projects/ProjectCard.tsx @@ -3,6 +3,7 @@ import type { ProjectDifficultyType, ProjectFileType, } from '../../lib/project.ts'; +import { Users } from 'lucide-react'; type ProjectCardProps = { project: ProjectFileType; @@ -34,13 +35,12 @@ export function ProjectCard(props: ProjectCardProps) { {frontmatter.title} {frontmatter.description} - - {userCount === 0 ? ( - Be the first to start this project - ) : ( - {userCount} user(s) have started this project - )} - + {userCount > 0 && ( + + + {userCount} Started + + )} ); }