From 65ffbae5b10ee19a09ac5da4f8923baa36b31c2c Mon Sep 17 00:00:00 2001 From: martypdx Date: Thu, 6 Apr 2017 17:32:53 -0700 Subject: [PATCH 1/2] initial commit --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c3a697e..1c723f7 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -# app \ No newline at end of file +# app + +WRITEME.md \ No newline at end of file From 0fa630ac03d4c721bdd9381c51fea69cc010dc92 Mon Sep 17 00:00:00 2001 From: martypdx Date: Thu, 6 Apr 2017 19:58:41 -0700 Subject: [PATCH 2/2] comments and feedback --- src/components/AllColorsStatic.js | 36 ++++++-------------- src/components/AllUsers.js | 12 ++----- src/components/App.js | 15 +++++---- src/components/Footer.js | 2 +- src/components/HomePage.js | 20 +++++++---- src/components/MainBody.js | 9 +++-- src/components/NavBar.js | 1 + src/components/UserCommentView.js | 4 +-- src/components/UserMain.js | 54 +++++++++++++----------------- src/components/UserMonthChart.js | 6 ++++ src/components/UserMonthView.js | 12 ++----- src/components/UserMoodSelector.js | 5 ++- src/components/UserMoodsDay.js | 2 ++ src/components/UserViewBar.js | 2 +- src/helpers/fetcher.js | 4 ++- 15 files changed, 86 insertions(+), 98 deletions(-) diff --git a/src/components/AllColorsStatic.js b/src/components/AllColorsStatic.js index a4d1dc2..7ba3e8c 100644 --- a/src/components/AllColorsStatic.js +++ b/src/components/AllColorsStatic.js @@ -1,33 +1,19 @@ import React from 'react'; -export default function AllColor(props) { +const Color = (src, alt) => ( +
+ {alt}/ +
+); + +export default function AllColor() { return (
-
- sad, dark blue -
-
- relaxed, dark green -
-
- happy, dark yellow -
-
- angry, dark red -
+ + + + { /* etc */}
diff --git a/src/components/AllUsers.js b/src/components/AllUsers.js index ca93da8..61bc254 100644 --- a/src/components/AllUsers.js +++ b/src/components/AllUsers.js @@ -46,11 +46,7 @@ export default class AllUsers extends Component { }) .then(fullCities => { cities = fullCities.map(city => { - const splitCity = city.split(','); - if(splitCity.length > 1){ - return splitCity.pop(); - } - return city; + return city.split(',')[0]; }); }) .then(() => { @@ -98,7 +94,6 @@ export default class AllUsers extends Component { }); } - populateFilter(chooseDefault, type, stateFilter) { return ( { + // because you have e, I think you can just use e.target.value const date = this.refs.date.value; e.preventDefault(); this.onDateChange(date); }}/>
diff --git a/src/components/App.js b/src/components/App.js index 32ab0bf..eb27b84 100644 --- a/src/components/App.js +++ b/src/components/App.js @@ -64,16 +64,19 @@ class App extends Component { } render() { return ( - < Router > - < div className='app'> - < Route path='/' render={props => ()} /> - < MainBody + +
+ ()} /> + - < Route path='/' component={ Footer }/> + { /* this Route isn't need as is always going to match + and your not using props */ + } +
- +
); } } diff --git a/src/components/Footer.js b/src/components/Footer.js index 8bbc829..988816d 100644 --- a/src/components/Footer.js +++ b/src/components/Footer.js @@ -1,6 +1,6 @@ import React from 'react'; -export default function Footer(props) { +export default function Footer() { return (