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 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 (