Skip to content

First delivery#70

Open
a13xmh wants to merge 11 commits into
wizelineacademy:react-cdmx-adjustmentsfrom
a13xmh:first_delivery
Open

First delivery#70
a13xmh wants to merge 11 commits into
wizelineacademy:react-cdmx-adjustmentsfrom
a13xmh:first_delivery

Conversation

@a13xmh

@a13xmh a13xmh commented Jul 9, 2018

Copy link
Copy Markdown

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

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

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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`

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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`

Copy link
Copy Markdown

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