Skip to content

Commit 78f37ed

Browse files
Merge pull request #673 from prathamkhatwani/fix-missing-project-slugs
Fix: add missing slugs to project entries to prevent /projects/undefi…
2 parents ade8066 + b6dd332 commit 78f37ed

2 files changed

Lines changed: 22 additions & 13 deletions

File tree

src/app/projects/[slug]/page.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ import projects from '@/helper/projects';
1313

1414
export async function generateStaticParams() {
1515
return projects
16-
.filter((p) => p.slug)
17-
.map((product) => ({
18-
slug: product.slug,
19-
}));
16+
.filter((p) => p?.slug && p.slug !== "undefined")
17+
.map((p) => ({
18+
slug: p.slug,
19+
}));
2020
}
2121

2222
export async function generateMetadata({ params }) {
23-
const product = projects.find((p) => p.slug === params.slug);
23+
const product = projects.find((p) => p?.slug === params?.slug);
2424
if (!product) {
2525
return {
2626
title: 'Project Not Found',

src/helper/projects.js

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,9 @@ const projects = [
280280
discordLink: 'https://discord.gg/xnmAPS7zqB',
281281
},
282282
{
283-
name: 'Agora Blockchain',
283+
284+
slug: 'agora-blockchain',
285+
name: 'Agora Blockchain',
284286
description:
285287
'There isn’t just one voting algorithm, there’s hundreds. Therefore, we developed Agora to allow for democratic elections using any algorithm.',
286288
link: {
@@ -292,7 +294,8 @@ const projects = [
292294
category: 'Ongoing'
293295
},
294296
{
295-
name: 'EduAid',
297+
slug: 'eduaid',
298+
name: 'EduAid',
296299
description:
297300
'An online tool that can generate short quizzes on input educational content can be of great use to teachers and students alike as it can help retain important information, frame questions and quickly revise large chunks of content.',
298301
link: { href: 'https://github.com/AOSSIE-Org/EduAid', label: 'EduAid' },
@@ -301,16 +304,19 @@ const projects = [
301304
category: 'Ongoing'
302305
},
303306
{
304-
name: 'OpenChat',
307+
slug: 'openchat',
308+
name: 'OpenChat',
305309
description:
306310
'a decentralised platform for secure and private messaging and file sharing built on top of blockchain',
307311
link: { href: '#', label: 'OpenChat' },
308312
logo: DefaultLogo,
309313
status: 'ongoing',
310314
category: 'Ongoing'
311315
},
312-
{
313-
name: 'Resonate',
316+
317+
{
318+
slug: 'resonate',
319+
name: 'Resonate',
314320
description:
315321
'With the rising popularity of social voice platforms such as Clubhouse, it is high time for an Open Source alternative. A platform like this would not only enhance credibility within the open-source community but also attract more users and foster growth. ',
316322
link: { href: 'https://github.com/AOSSIE-Org/Resonate', label: 'Resonate' },
@@ -319,16 +325,19 @@ const projects = [
319325
category: 'Ongoing'
320326
},
321327
{
322-
name: 'Monumento',
328+
slug: 'monumento',
329+
name: 'Monumento',
323330
description:
324331
'Monumento is an AR-integrated social app that transforms how you connect with the world’s most iconic landmarks. Through Monumento, you can check in to popular monuments, explore famous sites, and discover new people, all within a social platform.',
325332
link: { href: 'https://github.com/AOSSIE-Org/Monumento', label: 'Monumento' },
326333
logo: MonumentoLogo,
327334
status: 'ongoing',
328335
category: 'Ongoing'
329336
},
330-
{
331-
name: 'Social Street Smart',
337+
338+
{
339+
slug: 'social-street-smart',
340+
name: 'Social Street Smart',
332341
description:
333342
'With the adevent of Internet, the problems faced by the people have also grown. These include abusive languages.',
334343
link: {

0 commit comments

Comments
 (0)