From 9fafba5651bb6243e0ce3413db11b144f7f0086a Mon Sep 17 00:00:00 2001 From: mki-skt Date: Fri, 13 Apr 2018 00:11:05 +0900 Subject: [PATCH 1/3] fix : Testimonials of key prop error --- src/components/Testimonials.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Testimonials.js b/src/components/Testimonials.js index 05b15c4f1..425fc0355 100644 --- a/src/components/Testimonials.js +++ b/src/components/Testimonials.js @@ -3,8 +3,8 @@ import PropTypes from 'prop-types' const Testimonials = ({ testimonials }) => (
- {testimonials.map(testimonial => ( -
+ {testimonials.map((testimonial,index) => ( +
{testimonial.quote}
From 602bd54616caf196dbd7a38a21ef0f48b036c9fc Mon Sep 17 00:00:00 2001 From: mki-skt Date: Sun, 15 Apr 2018 00:29:58 +0900 Subject: [PATCH 2/3] add : uuid package --- package.json | 3 ++- yarn.lock | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 47e06cc4c..4351887e0 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,8 @@ "lodash-webpack-plugin": "^0.11.4", "prop-types": "^15.6.0", "react": "^16.2.0", - "react-helmet": "^5.2.0" + "react-helmet": "^5.2.0", + "uuid": "^3.2.1" }, "keywords": [ "gatsby" diff --git a/yarn.lock b/yarn.lock index 2ceb48f28..4046cea11 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10664,7 +10664,7 @@ uuid@^2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" -uuid@^3.0.0, uuid@^3.0.1, uuid@^3.1.0: +uuid@^3.0.0, uuid@^3.0.1, uuid@^3.1.0, uuid@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" From 0d265699ceed21db32b159bcebabb4882af9563b Mon Sep 17 00:00:00 2001 From: mki-skt Date: Sun, 15 Apr 2018 00:58:38 +0900 Subject: [PATCH 3/3] fix : Change map key to uuid --- src/components/Testimonials.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Testimonials.js b/src/components/Testimonials.js index 425fc0355..99cc3b989 100644 --- a/src/components/Testimonials.js +++ b/src/components/Testimonials.js @@ -1,10 +1,11 @@ import React from 'react' import PropTypes from 'prop-types' +import { v4 } from 'uuid' const Testimonials = ({ testimonials }) => (
- {testimonials.map((testimonial,index) => ( -
+ {testimonials.map(testimonial => ( +
{testimonial.quote}