From f5ba1046b13acd239c472e361f345902937662fb Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Thu, 20 Jan 2022 11:57:16 +0100
Subject: chore: add a page for projects

---
 src/components/ProjectsList/ProjectsList.tsx | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 src/components/ProjectsList/ProjectsList.tsx

(limited to 'src/components/ProjectsList/ProjectsList.tsx')

diff --git a/src/components/ProjectsList/ProjectsList.tsx b/src/components/ProjectsList/ProjectsList.tsx
new file mode 100644
index 0000000..609d824
--- /dev/null
+++ b/src/components/ProjectsList/ProjectsList.tsx
@@ -0,0 +1,21 @@
+import ProjectPreview from '@components/ProjectPreview/ProjectPreview';
+import { Project } from '@ts/types/app';
+import styles from './ProjectsList.module.scss';
+
+const ProjectsList = ({ projects }: { projects: Project[] }) => {
+  const getProjectItems = () => {
+    return projects.map((project) => {
+      return project.meta.title ? (
+        <li className={styles.item} key={project.id}>
+          <ProjectPreview project={project} />
+        </li>
+      ) : (
+        ''
+      );
+    });
+  };
+
+  return <ul className={styles.list}>{getProjectItems()}</ul>;
+};
+
+export default ProjectsList;
-- 
cgit v1.2.3

