-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First delivery #70
base: react-cdmx-adjustments
Are you sure you want to change the base?
First delivery #70
Conversation
…-adjustments Add Wizeline Academy Slack invitation link
.env
Outdated
@@ -0,0 +1,3 @@ | |||
REACT_APP_API_URL = https://api.giphy.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
umm don't know why this is still here
class FavsContainer extends Component { | ||
constructor(props) { | ||
super(props); | ||
this.state = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you aren't using this you can delete it :)
import React, { Component } from "react"; | ||
import styled from "styled-components"; | ||
|
||
const StyledImg = styled.div` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can create a styled.img
instead of a div with an img
inside
? selectedFavs.indexOf(giphy.id) !== -1 | ||
: false; | ||
|
||
if (isFav) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can create one styled component that receive a prop isFav
and then you add border if isFav
if not you don't do anything.
StyledImg = styled.img`
${props => props.isFav && `
border: 1em solid red;
border-radius: 1em;
`}
`
import styled from "styled-components"; | ||
import { Link } from "react-router-dom"; | ||
|
||
const StyledMenu = styled.div` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🆒
an API Key is needed at the .env file, REACT_APP_GIPHY_API_KEY =