diff --git a/app/page.tsx b/app/page.tsx
index 8050baf..0a80dd4 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -5,16 +5,18 @@ import ProjectList from "@/components/portfolio/projects";
import InterviewList from "@/components/interviews/interviews";
import ActionLink from "@/components/ui/actionlink";
import WorkExperience from "@/components/portfolio/experience";
+import Link from "next/link";
-import projects from "@/data/projects";
import { interviews } from "@/data/interviews";
+import { getProjects } from "@/lib/projects";
import experiences from "@/data/experiences";
-const featuredProjects = projects.slice(0, 2);
const featuredInterviews = interviews.slice(0, 4);
const currentRole = experiences.slice(0, 1);
-export default function Page() {
+export default async function Page() {
+ const projects = await getProjects(2);
+
return (
@@ -27,7 +29,13 @@ export default function Page() {
/>
Ashish Agarwal
-
@devashish2024
+
+ @devashish2024
+
@@ -78,7 +86,7 @@ export default function Page() {
Featured Projects
-
+
diff --git a/app/work/[slug]/page.tsx b/app/work/[slug]/page.tsx
new file mode 100644
index 0000000..95a7898
--- /dev/null
+++ b/app/work/[slug]/page.tsx
@@ -0,0 +1,54 @@
+import { getProjectBySlug, getProjects } from "@/lib/projects";
+import { notFound } from "next/navigation";
+import {
+ Breadcrumb,
+ BreadcrumbList,
+ BreadcrumbItem,
+ BreadcrumbLink,
+ BreadcrumbSeparator,
+} from "@/components/ui/breadcrumb";
+import ProjectPage from "@/components/work/projectPage";
+
+export async function generateStaticParams() {
+ const projects = await getProjects();
+ const slugs = projects.map((project) => ({ slug: project.slug }));
+
+ return slugs;
+}
+
+export default async function Project({
+ params,
+}: {
+ params: { slug: string };
+}) {
+ const { slug } = await params;
+ const project = await getProjectBySlug(slug);
+
+ if (!project) {
+ notFound();
+ }
+
+ const { metadata, content } = project;
+
+ return (
+
+
+
+
+ Home
+
+
+
+ Work
+
+
+
+ {metadata.title}
+
+
+
+
+
+
+ );
+}
diff --git a/app/work/page.tsx b/app/work/page.tsx
index dce2e1c..cb6296c 100644
--- a/app/work/page.tsx
+++ b/app/work/page.tsx
@@ -1,15 +1,31 @@
import WorkExperience from "@/components/portfolio/experience";
import ProjectList from "@/components/portfolio/projects";
+import {
+ Breadcrumb,
+ BreadcrumbList,
+ BreadcrumbItem,
+ BreadcrumbLink,
+ BreadcrumbSeparator,
+} from "@/components/ui/breadcrumb";
import experiences from "@/data/experiences";
-import projects from "@/data/projects";
+import { getProjects } from "@/lib/projects";
+
+export default async function Page() {
+ const projects = await getProjects();
-export default function Page() {
return (
-
-
+
+
+
+
+ Home
+
+
+
+ Work
+
+
+
Projects
@@ -18,6 +34,10 @@ export default function Page() {
+
);
}
diff --git a/components/layout/header.tsx b/components/layout/header.tsx
index cbfe902..9a3ae3d 100644
--- a/components/layout/header.tsx
+++ b/components/layout/header.tsx
@@ -46,7 +46,7 @@ export default function Header() {
-