Skip to content
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

Open
wants to merge 11 commits into
base: react-cdmx-adjustments
Choose a base branch
from

Conversation

a13xmh
Copy link

@a13xmh a13xmh commented Jul 9, 2018

an API Key is needed at the .env file, REACT_APP_GIPHY_API_KEY =

.env Outdated
@@ -0,0 +1,3 @@
REACT_APP_API_URL = https://api.giphy.com

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 = {};

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`

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) {

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`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆒

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants