From 2ea81dad3cc64a4cdd257ae54e09f267ac9d28d1 Mon Sep 17 00:00:00 2001 From: Toni Ristola Date: Thu, 24 Oct 2019 17:29:38 +0300 Subject: [PATCH 1/2] Refactoring patient projects --- pages/index.jsx | 81 +++++++++++----------------------------- pages/patientProjects.js | 27 ++++++++++++++ 2 files changed, 48 insertions(+), 60 deletions(-) create mode 100644 pages/patientProjects.js diff --git a/pages/index.jsx b/pages/index.jsx index 7856ce4..8224471 100644 --- a/pages/index.jsx +++ b/pages/index.jsx @@ -2,10 +2,10 @@ import React from "react"; import "../styles/style.styl"; import "../styles/icons.less"; import Head from "next/head"; -import InviteForm from '../components/InviteForm'; -import Members from '../components/Members'; -import Feed from '../components/Feed'; - +import InviteForm from "../components/InviteForm"; +import Members from "../components/Members"; +import Feed from "../components/Feed"; +import { projects } from './patientProjects' const Hero = () => (
); +const PatientProject = ({ title, description, url, image }) => ( +
+
+ + + +
+
+

{title}

+

{description}

+
+
+); + const IndexContent = () => ( <>
@@ -107,62 +121,9 @@ const IndexContent = () => (

Potilaiden projekteja

-
-
- - - -
-
-

RE:DOM

-

- Tiny (2 KB) turboboosted JavaScript library for creating user - interfaces. Develop web apps with 100 % JavaScript and web - standards. -

-
-
-
-
- - - -
-
-

Code::Stats

-

- Code::Stats is a free stats tracking service for programmers -

-
-
-
-
- - - -
-
-

Reactabular

-

A framework for building the React table you need

-
-
-
-
- - - -
-
-

Avain.app

-

Secure one-time password manager (PWA + Web Crypto)

-
-
+ {projects.map(project => ( + + ))}
diff --git a/pages/patientProjects.js b/pages/patientProjects.js new file mode 100644 index 0000000..5fd5e75 --- /dev/null +++ b/pages/patientProjects.js @@ -0,0 +1,27 @@ +export const projects = [ + { + title: "RE:DOM", + description: + " Tiny (2 KB) turboboosted JavaScript library for creating user interfaces. Develop web apps with 100 % JavaScript and web standards.", + url: "https://redom.js.org", + image: "/static/images/redom.svg", + }, + { + title: "Code::Stats", + description: "Code::Stats is a free stats tracking service for programmers", + url: "https://codestats.net/", + image: "/static/images/codestats.png", + }, + { + title: "Reactabular", + description: "A framework for building the React table you need", + url: "https://reactabular.js.org/", + image: "/static/images/reactabular.png", + }, + { + title: "Avain.app", + description: "Secure one-time password manager (PWA + Web Crypto)", + url: "https://avain.app", + image: "/static/images/avain.svg", + }, +]; From 82ebbe0d921080df4c3b3a76b550452cdfb4e175 Mon Sep 17 00:00:00 2001 From: Toni Ristola Date: Thu, 24 Oct 2019 18:03:49 +0300 Subject: [PATCH 2/2] moved project data under different folder --- pages/patientProjects.js => data/indexData.js | 2 +- pages/index.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename pages/patientProjects.js => data/indexData.js (80%) diff --git a/pages/patientProjects.js b/data/indexData.js similarity index 80% rename from pages/patientProjects.js rename to data/indexData.js index 5fd5e75..f8c1fb8 100644 --- a/pages/patientProjects.js +++ b/data/indexData.js @@ -2,7 +2,7 @@ export const projects = [ { title: "RE:DOM", description: - " Tiny (2 KB) turboboosted JavaScript library for creating user interfaces. Develop web apps with 100 % JavaScript and web standards.", + "Tiny (2 KB) turboboosted JavaScript library for creating user interfaces. Develop web apps with 100 % JavaScript and web standards.", url: "https://redom.js.org", image: "/static/images/redom.svg", }, diff --git a/pages/index.jsx b/pages/index.jsx index 8224471..07f2c39 100644 --- a/pages/index.jsx +++ b/pages/index.jsx @@ -5,7 +5,7 @@ import Head from "next/head"; import InviteForm from "../components/InviteForm"; import Members from "../components/Members"; import Feed from "../components/Feed"; -import { projects } from './patientProjects' +import { projects } from '../data/indexData'; const Hero = () => (