Skip to content

Commit eac014c

Browse files
Fix team image loading and integrate real project/team data
Co-authored-by: rezwana-karim <126201034+rezwana-karim@users.noreply.github.com>
1 parent 0931f47 commit eac014c

4 files changed

Lines changed: 81 additions & 298 deletions

File tree

src/app/team/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,13 @@ export default function TeamPage() {
3939
<CardHeader className="pb-4">
4040
<div className="w-24 h-24 mx-auto mb-4 rounded-full overflow-hidden bg-muted border-2 border-primary/20">
4141
<Image
42-
src={member.image.startsWith('/') ? member.image : `/team-members/${member.image}`}
42+
src={member.image}
4343
alt={`${member.name} avatar`}
4444
width={96}
4545
height={96}
4646
className="w-full h-full object-cover"
4747
unoptimized={true}
48+
priority={index < 3}
4849
/>
4950
</div>
5051
<CardTitle className="text-lg">{member.name}</CardTitle>

src/components/home/projects-section.tsx

Lines changed: 55 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -4,95 +4,16 @@ import { Typography } from "@/components/ui/typography"
44
import { Grid } from "@/components/ui/grid"
55
import { Stack } from "@/components/ui/stack"
66
import { Button } from "@/components/ui/button"
7-
import { GitHubLogoIcon, StarIcon, PersonIcon } from "@radix-ui/react-icons"
8-
9-
interface Project {
10-
id: string
11-
name: string
12-
description: string
13-
stars: number
14-
contributors: number
15-
primaryTech: string
16-
category: string
17-
repoUrl: string
18-
projectUrl?: string
19-
}
20-
21-
// Mock data for projects
22-
const projects: Project[] = [
23-
{
24-
id: "1",
25-
name: "DataStorm Analytics",
26-
description: "Real-time data processing and visualization platform built for scalability",
27-
stars: 2847,
28-
contributors: 18,
29-
primaryTech: "Python",
30-
category: "Data Science",
31-
repoUrl: "https://github.com/CodeStorm-Hub/datastorm-analytics",
32-
projectUrl: "/projects/datastorm-analytics"
33-
},
34-
{
35-
id: "2",
36-
name: "CloudNative Toolkit",
37-
description: "Container orchestration and microservices deployment automation tools",
38-
stars: 1523,
39-
contributors: 12,
40-
primaryTech: "Go",
41-
category: "Infrastructure",
42-
repoUrl: "https://github.com/CodeStorm-Hub/cloudnative-toolkit",
43-
projectUrl: "/projects/cloudnative-toolkit"
44-
},
45-
{
46-
id: "3",
47-
name: "ML Research Hub",
48-
description: "Open source machine learning algorithms and research implementations",
49-
stars: 3241,
50-
contributors: 25,
51-
primaryTech: "Python",
52-
category: "Research",
53-
repoUrl: "https://github.com/CodeStorm-Hub/ml-research-hub",
54-
projectUrl: "/projects/ml-research-hub"
55-
},
56-
{
57-
id: "4",
58-
name: "DevTools Suite",
59-
description: "Developer productivity tools and utilities for modern web development",
60-
stars: 892,
61-
contributors: 8,
62-
primaryTech: "TypeScript",
63-
category: "Dev Tools",
64-
repoUrl: "https://github.com/CodeStorm-Hub/devtools-suite",
65-
projectUrl: "/projects/devtools-suite"
66-
},
67-
{
68-
id: "5",
69-
name: "Security Scanner",
70-
description: "Automated security vulnerability scanner for open source dependencies",
71-
stars: 1687,
72-
contributors: 14,
73-
primaryTech: "Rust",
74-
category: "Security",
75-
repoUrl: "https://github.com/CodeStorm-Hub/security-scanner",
76-
projectUrl: "/projects/security-scanner"
77-
},
78-
{
79-
id: "6",
80-
name: "API Gateway",
81-
description: "High-performance API gateway with rate limiting and authentication",
82-
stars: 2156,
83-
contributors: 16,
84-
primaryTech: "Node.js",
85-
category: "Infrastructure",
86-
repoUrl: "https://github.com/CodeStorm-Hub/api-gateway",
87-
projectUrl: "/projects/api-gateway"
88-
}
89-
]
7+
import { GitHubLogoIcon, StarIcon, PersonIcon, ExternalLinkIcon } from "@radix-ui/react-icons"
8+
import { getFeaturedProjects } from "@/lib/project-data"
909

9110
interface ProjectsSectionProps {
9211
className?: string
9312
}
9413

9514
export default function ProjectsSection({ className }: ProjectsSectionProps) {
15+
const featuredProjects = getFeaturedProjects(6)
16+
9617
return (
9718
<section className={className} aria-labelledby="projects-heading">
9819
<Container className="py-16 sm:py-24">
@@ -109,63 +30,78 @@ export default function ProjectsSection({ className }: ProjectsSectionProps) {
10930

11031
{/* Projects Grid */}
11132
<Grid cols={3} gap={6} className="w-full">
112-
{projects.map((project) => (
113-
<Card key={project.id} className="h-full hover:shadow-lg transition-shadow duration-200">
33+
{featuredProjects.map((project) => (
34+
<Card key={project.slug} className="h-full hover:shadow-lg transition-shadow duration-200">
11435
<CardHeader>
11536
<Stack gap={2}>
11637
<div className="flex items-center justify-between">
11738
<CardTitle className="text-lg">{project.name}</CardTitle>
118-
<span className="inline-flex items-center rounded-md bg-primary/10 px-2 py-1 text-xs font-medium text-primary">
119-
{project.primaryTech}
120-
</span>
39+
{project.primaryLanguage && (
40+
<span className="inline-flex items-center rounded-md bg-primary/10 px-2 py-1 text-xs font-medium text-primary">
41+
{project.primaryLanguage}
42+
</span>
43+
)}
12144
</div>
122-
<span className="inline-flex items-center rounded-md bg-muted px-2 py-1 text-xs font-medium text-muted-foreground w-fit">
123-
{project.category}
124-
</span>
45+
{project.techStack && project.techStack.length > 0 && (
46+
<span className="inline-flex items-center rounded-md bg-muted px-2 py-1 text-xs font-medium text-muted-foreground w-fit">
47+
{project.techStack[0]}
48+
</span>
49+
)}
12550
</Stack>
12651
</CardHeader>
12752
<CardContent>
12853
<Stack gap={4}>
12954
<CardDescription className="line-clamp-2">
130-
{project.description}
55+
{project.overview || project.description || "No description available."}
13156
</CardDescription>
13257

13358
{/* Project Stats */}
13459
<div className="flex items-center gap-4 text-sm text-muted-foreground">
135-
<div className="flex items-center gap-1">
136-
<StarIcon className="h-4 w-4" aria-hidden="true" />
137-
<span aria-label={`${project.stars} stars`}>
138-
{project.stars.toLocaleString()}
139-
</span>
140-
</div>
141-
<div className="flex items-center gap-1">
142-
<PersonIcon className="h-4 w-4" aria-hidden="true" />
143-
<span aria-label={`${project.contributors} contributors`}>
144-
{project.contributors}
145-
</span>
146-
</div>
60+
{project.stars !== undefined && (
61+
<div className="flex items-center gap-1">
62+
<StarIcon className="h-4 w-4" aria-hidden="true" />
63+
<span aria-label={`${project.stars} stars`}>
64+
{project.stars.toLocaleString()}
65+
</span>
66+
</div>
67+
)}
68+
{project.forks !== undefined && (
69+
<div className="flex items-center gap-1">
70+
<PersonIcon className="h-4 w-4" aria-hidden="true" />
71+
<span aria-label={`${project.forks} forks`}>
72+
{project.forks}
73+
</span>
74+
</div>
75+
)}
14776
</div>
14877

14978
{/* Action Buttons */}
15079
<div className="flex gap-2 pt-2">
151-
{project.projectUrl ? (
80+
{project.liveDemo && (
81+
<Button variant="outline" size="sm" className="flex-1" asChild>
82+
<a
83+
href={project.liveDemo}
84+
target="_blank"
85+
rel="noopener noreferrer"
86+
>
87+
<ExternalLinkIcon className="mr-2 h-4 w-4" aria-hidden="true" />
88+
Live Demo
89+
</a>
90+
</Button>
91+
)}
92+
{project.github && (
15293
<Button variant="outline" size="sm" className="flex-1" asChild>
153-
<a href={project.projectUrl}>
154-
View Project
94+
<a
95+
href={project.github}
96+
target="_blank"
97+
rel="noopener noreferrer"
98+
aria-label={`View ${project.name} on GitHub`}
99+
>
100+
<GitHubLogoIcon className="mr-2 h-4 w-4" aria-hidden="true" />
101+
GitHub
155102
</a>
156103
</Button>
157-
) : null}
158-
<Button variant="outline" size="sm" className="flex-1" asChild>
159-
<a
160-
href={project.repoUrl}
161-
target="_blank"
162-
rel="noopener noreferrer"
163-
aria-label={`View ${project.name} on GitHub`}
164-
>
165-
<GitHubLogoIcon className="mr-2 h-4 w-4" aria-hidden="true" />
166-
GitHub
167-
</a>
168-
</Button>
104+
)}
169105
</div>
170106
</Stack>
171107
</CardContent>

0 commit comments

Comments
 (0)