diff --git a/app/about/page.tsx b/app/about/page.tsx index 0416f332..54ea31ba 100644 --- a/app/about/page.tsx +++ b/app/about/page.tsx @@ -1,4 +1,5 @@ import getMarkdownFromFileSystem from "@/actions/file-system/getMarkdownFromFileSystem"; +import MaterialList from "@/components/MaterialLists/MaterialList"; import Reader from "@/components/Reader/Reader"; import Socials from "@/components/Socials/Socials"; import HeadingOne from "@/components/Text/HeadingOne"; @@ -8,6 +9,8 @@ import subtitles from "@/constants/subtitles"; import companyDatabaseMap from "@/database/Companies/CompanyDatabaseMap"; import courseDatabaseMap from "@/database/Courses/CourseDatabaseMap"; import CourseInterface from "@/database/Courses/CourseInterface"; +import ProjectDatabaseKeys from "@/database/Projects/ProjectDatabaseKeys"; +import RoleDatabaseKeys from "@/database/Roles/RoleDatabaseKeys"; import rolesDatabase from "@/database/Roles/RoleDatabaseMap"; import RoleInterface from "@/database/Roles/RoleInterface"; import type { Metadata } from "next"; @@ -41,6 +44,13 @@ export default function About() { const latestEducation: CourseInterface = Object.values(courseDatabaseMap)[0]; const latestUniversityName: string = latestEducation.university; const latestCourseName: string = latestEducation.name; + const featuredMaterial: string[] = [ + RoleDatabaseKeys.CommerzbankDevOpsEngineer, + RoleDatabaseKeys.GoogleRHULDevelopersClubSoftwareEngineer, + ProjectDatabaseKeys.CircusDiscussions, + ProjectDatabaseKeys.HousePricePrediction, + ProjectDatabaseKeys.Noodle, + ]; return (
@@ -64,56 +74,59 @@ export default function About() { -
+
- {/* Left section */} -
- -
+ > + {/* Left section */} +
+ +
- {/* Right section */} -
- {/* Profile Image */} - Profile image of the developer + {/* Right section */} +
+ {/* Profile Image */} + Profile image of the developer - {/* Social Icons */} -
- -
+ {/* Social Icons */} +
+ +
- {/* Details */} - + {/* Details */} + +
+
); } diff --git a/app/blogs/[blogKey]/page.tsx b/app/blogs/[blogKey]/page.tsx index fc57d2d0..6293139c 100644 --- a/app/blogs/[blogKey]/page.tsx +++ b/app/blogs/[blogKey]/page.tsx @@ -38,6 +38,10 @@ export async function generateMetadata( const blogKey: string = params.blogKey; const blog: BlogInterface = blogsDatabaseMap[blogKey]; + if (!blog) { + notFound(); + } + return { title: `${developerName} - Blogs: ${blog?.name}`, description: blog?.subtitle, @@ -156,9 +160,7 @@ const BlogPage: React.FC = ({ params }) => { {blogData.relatedMaterials && blogData.relatedMaterials.length > 0 && ( <> - + )} diff --git a/app/certificates/[certificateKey]/page.tsx b/app/certificates/[certificateKey]/page.tsx index 4ebe492d..0ab2a62a 100644 --- a/app/certificates/[certificateKey]/page.tsx +++ b/app/certificates/[certificateKey]/page.tsx @@ -43,6 +43,10 @@ export async function generateMetadata( const certificate: CertificateInterface = certificateDatabaseMap[certificateKey]; + if (!certificate) { + notFound(); + } + // Create metadata based on the certificate details return { title: `${developerName} - Certificates: ${certificate?.name}`, diff --git a/app/education/[courseKey]/[moduleKey]/page.tsx b/app/education/[courseKey]/[moduleKey]/page.tsx index 5476e4a4..724090e4 100644 --- a/app/education/[courseKey]/[moduleKey]/page.tsx +++ b/app/education/[courseKey]/[moduleKey]/page.tsx @@ -42,6 +42,10 @@ export async function generateMetadata( const moduleKey: string = params.moduleKey; const moduleData: ModuleInterface = moduleDatabaseMap[moduleKey]; + if (!moduleData) { + notFound(); + } + // Create metadata based on the course details return { title: `${developerName} - Courses: ${moduleData?.name}`, diff --git a/app/education/[courseKey]/page.tsx b/app/education/[courseKey]/page.tsx index 6d2e0860..71c3499c 100644 --- a/app/education/[courseKey]/page.tsx +++ b/app/education/[courseKey]/page.tsx @@ -53,6 +53,10 @@ export async function generateMetadata( const courseKey: string = params.courseKey; const course: CourseInterface = courseDatabaseMap[courseKey]; + if (!course) { + notFound(); + } + // Create metadata based on the course details return { title: `${developerName} - Courses: ${course?.name}`, diff --git a/app/experience/[roleKey]/page.tsx b/app/experience/[roleKey]/page.tsx index 23461f52..698a8dbc 100644 --- a/app/experience/[roleKey]/page.tsx +++ b/app/experience/[roleKey]/page.tsx @@ -47,6 +47,12 @@ export async function generateMetadata( const roleKey: string = params.roleKey; const role: RoleInterface = rolesDatabase[roleKey]; + if (!role) { + notFound(); + } + + const company: CompanyInterface = companyDatabaseMap[role.company]; + return { title: `${developerName} - ${EXPERIENCE_PAGE.label}: ${role?.name}`, description: `${role.type} ${role.name} at ${role?.company}`, @@ -54,7 +60,7 @@ export async function generateMetadata( creator: developerName, keywords: [ role.name, - role.company, + company.name, ...role?.skills.map((skill) => skillDatabaseMap[skill].name), ], }; @@ -90,12 +96,13 @@ export const generateStaticParams = async () => { const RolePage: React.FC = ({ params }) => { const roleKey: string = params.roleKey; const roleData: RoleInterface = rolesDatabase[roleKey]; - const companyData: CompanyInterface = companyDatabaseMap[roleData.company]; if (!roleData) { notFound(); } + const companyData: CompanyInterface = companyDatabaseMap[roleData.company]; + const technologies: SkillDatabaseKeys[] = filterSkillsByType( roleData.skills, skillDatabaseMap, diff --git a/app/projects/[projectKey]/page.tsx b/app/projects/[projectKey]/page.tsx index 45412ec6..44e042ba 100644 --- a/app/projects/[projectKey]/page.tsx +++ b/app/projects/[projectKey]/page.tsx @@ -51,6 +51,10 @@ export async function generateMetadata( // Assume getProjectBySlug function fetches project by slug const project: ProjectInterface = projectDatabaseMap[projectKey]; + if (!project) { + notFound(); + } + // Create metadata based on the project details return { title: `${developerName} - Projects: ${project?.name}`,