diff --git a/src/app/projects/[slug]/page.jsx b/src/app/projects/[slug]/page.jsx index 4fb73803..609e26c9 100644 --- a/src/app/projects/[slug]/page.jsx +++ b/src/app/projects/[slug]/page.jsx @@ -13,14 +13,14 @@ import projects from '@/helper/projects'; export async function generateStaticParams() { return projects - .filter((p) => p.slug) - .map((product) => ({ - slug: product.slug, - })); + .filter((p) => p?.slug && p.slug !== "undefined") + .map((p) => ({ + slug: p.slug, + })); } export async function generateMetadata({ params }) { - const product = projects.find((p) => p.slug === params.slug); + const product = projects.find((p) => p?.slug === params?.slug); if (!product) { return { title: 'Project Not Found', diff --git a/src/helper/projects.js b/src/helper/projects.js index 580495c2..e642077d 100644 --- a/src/helper/projects.js +++ b/src/helper/projects.js @@ -280,7 +280,9 @@ const projects = [ discordLink: 'https://discord.gg/xnmAPS7zqB', }, { - name: 'Agora Blockchain', + + slug: 'agora-blockchain', + name: 'Agora Blockchain', description: 'There isn’t just one voting algorithm, there’s hundreds. Therefore, we developed Agora to allow for democratic elections using any algorithm.', link: { @@ -292,7 +294,8 @@ const projects = [ category: 'Ongoing' }, { - name: 'EduAid', + slug: 'eduaid', + name: 'EduAid', description: '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.', link: { href: 'https://github.com/AOSSIE-Org/EduAid', label: 'EduAid' }, @@ -301,7 +304,8 @@ const projects = [ category: 'Ongoing' }, { - name: 'OpenChat', + slug: 'openchat', + name: 'OpenChat', description: 'a decentralised platform for secure and private messaging and file sharing built on top of blockchain', link: { href: '#', label: 'OpenChat' }, @@ -309,8 +313,10 @@ const projects = [ status: 'ongoing', category: 'Ongoing' }, - { - name: 'Resonate', + + { + slug: 'resonate', + name: 'Resonate', description: '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. ', link: { href: 'https://github.com/AOSSIE-Org/Resonate', label: 'Resonate' }, @@ -319,7 +325,8 @@ const projects = [ category: 'Ongoing' }, { - name: 'Monumento', + slug: 'monumento', + name: 'Monumento', description: '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.', link: { href: 'https://github.com/AOSSIE-Org/Monumento', label: 'Monumento' }, @@ -327,8 +334,10 @@ const projects = [ status: 'ongoing', category: 'Ongoing' }, - { - name: 'Social Street Smart', + + { + slug: 'social-street-smart', + name: 'Social Street Smart', description: 'With the adevent of Internet, the problems faced by the people have also grown. These include abusive languages.', link: {