my challenge pr#65
Conversation
…orite, add searchbox on favs view
| const API_URL = 'https://api.giphy.com/v1/gifs/'; | ||
|
|
||
| const fetchTrending = (dispatch) => { | ||
| axios.get(`${API_URL}trending?api_key=SA3WrTOcAq5bNF9hsWC4Z8j0O1UkOMuB&limit=10&rating=G`) |
There was a problem hiding this comment.
I'll advise that you put your api_key in .env and provide a .env.example
| } | ||
| } | ||
|
|
||
| const mapStateToProps = (state) => { |
There was a problem hiding this comment.
I'll advise that you divide components and containers in different files. It's easier to read and check.
|
|
||
| } | ||
|
|
||
| removeFav = (event) =>{ |
There was a problem hiding this comment.
this should be in the container, not in the component.
| this.props.trendingGifs.query = value | ||
| } | ||
|
|
||
| addFav = (event) =>{ |
There was a problem hiding this comment.
this should be in the container, not in the component.
|
As general feedback, try to create (almost) stateless components and migrate all the logic to containers. |
| <li><NavLink to="/favs">Your favs</NavLink></li> | ||
| <li><NavLink to="/">Trending</NavLink></li> | ||
| </ul> | ||
| <Switch> |
| <div className="App-intro"> | ||
| <h1>React Challenge</h1> | ||
| <ul> | ||
| <li><NavLink to="/favs">Your favs</NavLink></li> |
first style components
separate components
| @@ -23,6 +23,13 @@ | |||
| } | |||
|
|
|||
| @keyframes App-logo-spin { | |||
There was a problem hiding this comment.
please use styled components for the keyframes. Delete all the css and use the styled components
| } | ||
|
|
||
| return ( | ||
| <div className="home"> |
|
|
||
| class Page404 extends Component{ | ||
| render(){ | ||
| return <div className='not-found'> |
| @@ -0,0 +1,60 @@ | |||
| import styled from "styled-components"; | |||
There was a problem hiding this comment.
I will advise that you create a .style.js file per component. Not a global one
remove global app.css
No description provided.