From 338db250e153e3731c8a462fd5ffb4524710ca38 Mon Sep 17 00:00:00 2001 From: gbrochar Date: Sun, 29 Nov 2020 18:58:41 +0100 Subject: [PATCH] Quote and Footer --- package.json | 2 +- src/client/Footer.tsx | 48 ++++++++++++++++++++++++++++ src/client/ImagesWithDescription.tsx | 2 +- src/client/Quote.tsx | 35 ++++++++++++++++++++ src/client/Root.tsx | 14 ++++---- 5 files changed, 92 insertions(+), 9 deletions(-) create mode 100644 src/client/Footer.tsx create mode 100644 src/client/Quote.tsx diff --git a/package.json b/package.json index e1f3712..dfad8c3 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "dev:client:js": "webpack --config config/webpack.client.dev.js", "dev:client": "concurrently \"npm:dev:client:types\" \"npm:dev:client:js\"", "dev:start": "mkdir -p dist/server && touch dist/server/bundle.js && nodemon dist/server/bundle.js", - "dev": "rm -rf dist && concurrently \"npm:dev:server\" \"npm:dev:client\" \"npm:dev:start\"", + "dev": "concurrently \"npm:dev:server\" \"npm:dev:client\" \"npm:dev:start\"", "start": "node dist/server/bundle.js" }, "author": "gbrochar", diff --git a/src/client/Footer.tsx b/src/client/Footer.tsx new file mode 100644 index 0000000..4d934a6 --- /dev/null +++ b/src/client/Footer.tsx @@ -0,0 +1,48 @@ +import React from 'react'; + +interface Link { + to: string; + text: string; +} + +interface Card { + title: string; + description: string; + links: Array; +} + +interface FooterProps { + elements: Array; +} + +/** + * @return {jsx} The root component + */ +export default function Footer( + {elements}: FooterProps) { + return ( + +
+ {elements.map((elem, index) => +
+

+ {elem.title} +

+

+ {elem.links.map((link, i) => + )} +
)} +
+
+ ); +} diff --git a/src/client/ImagesWithDescription.tsx b/src/client/ImagesWithDescription.tsx index c0c8ffc..90cf0db 100644 --- a/src/client/ImagesWithDescription.tsx +++ b/src/client/ImagesWithDescription.tsx @@ -17,7 +17,7 @@ export default function ImagesWithDescription( {images}: imagesWithDescriptionProps) { return ( -
+
{images.map((elem, index) =>
+
+
+
+

{quote}

+
{author}
+
+
{description}
+
+
+ + ); +} diff --git a/src/client/Root.tsx b/src/client/Root.tsx index 9770e79..d969e57 100644 --- a/src/client/Root.tsx +++ b/src/client/Root.tsx @@ -1,6 +1,8 @@ import React from 'react'; import Navbar from './Navbar'; import Banner from './Banner'; +import Quote from './Quote'; +import Footer from './Footer'; import ImagesWithDescription from './ImagesWithDescription'; /** @@ -64,8 +66,7 @@ export default function Root() { ce voyage aurait peu de sens.`, }, ]}/> - {/* eslint-disable */} - {/* `, links: [ { - to: '/contant', + to: '/contact', text: `Autres façons de nous contacter`, }, ], @@ -105,16 +106,15 @@ export default function Root() { :)`, links: [ { - to: 'paypal.me/ygarrot', + to: 'https://paypal.me/ygarrot', text: 'Paypal', }, { - to: 'tipeee.com/curious-roamers', + to: 'https://tipeee.com/curious-roamers', text: 'Tipeee', }, ], }, - ]}/> */} - {/* eslint-enable */} + ]}/> ); }