diff --git a/components/ProjectsList.js b/components/ProjectsList.js
new file mode 100644
index 0000000..bb14b0e
--- /dev/null
+++ b/components/ProjectsList.js
@@ -0,0 +1,46 @@
+import Link from "next/link";
+import projects from "../db/projects";
+import styles from "./ProjectsList.module.css";
+
+export default function ProjectsList() {
+ const mediaProjects = projects.filter((project) => {
+ return project.categories.includes("Media");
+ });
+ const designProjects = projects.filter((project) => {
+ return project.categories.includes("Media");
+ });
+
+ return (
+
+
+ Media
+
+ {mediaProjects.map((project) => (
+
+
{project.name}
+
{project.description}
+
+ View
+
+
+ ))}
+
+
+
+
+ Design
+
+ {designProjects.map((project) => (
+
+
{project.name}
+
{project.description}
+
+ View
+
+
+ ))}
+
+
+
+ );
+}
diff --git a/pages/projects.module.css b/components/ProjectsList.module.css
similarity index 100%
rename from pages/projects.module.css
rename to components/ProjectsList.module.css
diff --git a/db/projects.js b/db/projects.js
index 1b4be3b..257e608 100644
--- a/db/projects.js
+++ b/db/projects.js
@@ -1,13 +1,21 @@
const projects = [
{
- slug: "farmers-market",
- name: "Farmer's market",
- description: "Buy some fruits and vegetables",
+ slug: "glass-slide-digitization",
+ name: "Glass Slide Digitization",
+ description: "Digitized some glass slides",
+ categories: ["Media", "Design"],
},
{
- slug: "chess",
- name: "Chess",
- description: "Play chess online",
+ slug: "35mm-slide-digitization",
+ name: "35mm Slide Digitization",
+ description: "Digitized some 35mm slides",
+ categories: ["Media"],
+ },
+ {
+ slug: "neighborhood-organization-logo",
+ name: "Neighborhood Organization Logo",
+ description: "Design logo for Neighborhood Organization",
+ categories: ["Design"],
},
];
diff --git a/pages/index.js b/pages/index.js
index 8387fc1..47f5b6f 100644
--- a/pages/index.js
+++ b/pages/index.js
@@ -1,6 +1,7 @@
import Head from "next/head";
import Navigation from "@components/Navigation";
import Footer from "@components/Footer";
+import ProjectsList from "@components/ProjectsList";
export default function Home() {
return (
@@ -16,6 +17,8 @@ export default function Home() {
Welcome to my portfolio
This is the home page
+
+
diff --git a/pages/projects.js b/pages/projects.js
index b6bd3ba..dfc30f2 100644
--- a/pages/projects.js
+++ b/pages/projects.js
@@ -1,9 +1,7 @@
import Head from "next/head";
-import Link from "next/link";
import Navigation from "@components/Navigation";
import Footer from "@components/Footer";
-import projects from "../db/projects";
-import projectStyles from "./projects.module.css";
+import ProjectsList from "@components/ProjectsList";
export default function Projects() {
return (
@@ -20,21 +18,7 @@ export default function Projects() {
This is the projects page
-
-
- {projects.map((project) => (
-
-
{project.name}
-
- {project.description}
-
-
- View
-
-
- ))}
-
-
+