Skip to content

Commit 6e784c4

Browse files
committed
feat: updated ProjectTile to include badge of tech stack
1 parent 266f323 commit 6e784c4

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/components/Projects.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function Projects({ arr }: ProjectProps) {
1111
<section id="projects" className="mb-12">
1212
<h2 className="text-2xl md:text-3xl lg:text-4xl font-section font-bold mb-4">Projects</h2>
1313
{projects && projects.length > 0 ? (
14-
<div className="space-y-4">
14+
<div className="space-y-5">
1515
{projects.map((project, index) => (
1616
<ProjectTile key={index} {...project} />
1717
))}

src/components/Tiles/ProjectTile.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { ArrowUpRight } from 'lucide-react'
22
import { useMediaQuery } from '@/hooks/useMediaQuery'
3+
import { Badge } from '@/components/ui/Badge'
34

45
export type ProjectTileProps = {
56
title: string
@@ -8,9 +9,10 @@ export type ProjectTileProps = {
89
repoUrl?: string,
910
live: boolean,
1011
liveUrl?: string,
12+
techStack: string[]
1113
}
1214

13-
export function ProjectTile({ title, description, repo, repoUrl, live, liveUrl }: ProjectTileProps) {
15+
export function ProjectTile({ title, description, repo, repoUrl, live, liveUrl, techStack }: ProjectTileProps) {
1416
const isDesktop = useMediaQuery('(min-width: 768px)')
1517
return (
1618
<div className="items-center">
@@ -38,6 +40,13 @@ export function ProjectTile({ title, description, repo, repoUrl, live, liveUrl }
3840
</div>
3941
</div>
4042
<p className="text-gray-700 dark:text-gray-300">{description}</p>
43+
{techStack && techStack.length > 0 && (
44+
<div className="mt-1 space-x-2">
45+
{techStack.map((skillText, index) => (
46+
<Badge key={index} variant={`secondary`}>{skillText}</Badge>
47+
))}
48+
</div>
49+
)}
4150
</div>
4251
)
4352
}

0 commit comments

Comments
 (0)