Skip to content

Conversation

@israelWL
Copy link

@israelWL israelWL commented Mar 6, 2021

No description provided.

Copy link

@dianasaurio dianasaurio left a comment

Choose a reason for hiding this comment

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

I had problems with your netlify app, ping me if you fix it

.env Outdated
REACT_APP_YOUTUBE_PLAYLIST_ITEMS_API = "https://youtube.googleapis.com/youtube/v3/playlistItems"
REACT_APP_YOUTUBE_CHANNELS_LIST_API = "https://www.googleapis.com/youtube/v3/channels"
REACT_APP_YOUTUBE_SEARCH = "https://content-youtube.googleapis.com/youtube/v3/search"
REACT_APP_YOUTUBE_API_KEY="AIzaSyAx6keB9STIcO-bkIKuy-ubU6CZO9pnwXQ"

Choose a reason for hiding this comment

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

I suggest you don't commit sensitive data, you can add a .env.example with placeholder values and add the .env extension to the .gitignore

@@ -0,0 +1,3 @@
window.env = {
"YOUTUBE_API_KEY": "AIzaSyAx6keB9STIcO-bkIKuy-ubU6CZO9pnwXQ"

Choose a reason for hiding this comment

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

Why do you need this file if you have a .env?

return (
<ButtonContainer>
<span>
<img className="image" alt="User Avatar" src="https://media.glassdoor.com/sqll/868055/wizeline-squarelogo-1473976610815.png" />

Choose a reason for hiding this comment

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

It will look cleaner if you use a variable for the image URL and pass it to the src.

@@ -0,0 +1,23 @@
import React from 'react';
import Button from './Button.component';
import renderer from 'react-test-renderer';

Choose a reason for hiding this comment

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

I would suggest you use react-testing-library since it's the recommended approach


const LeftNav = ({ open }) => {
return (
<Ul open={open}>

Choose a reason for hiding this comment

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

Try to give your components descriptive names, using the same names as HTML tags can cause confusion when reading code.


import { Box, BoxImage, BoxInfo, BoxTitle, BoxText } from './styled';

const NoImage = require('./noimage.jpg');

Choose a reason for hiding this comment

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

It's best to use import instead of require for react apps

@@ -0,0 +1,36 @@
import { useEffect, useState } from "react";
import { useParams } from 'react-router-dom';

Choose a reason for hiding this comment

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

It's best to use react-router to handle URL params:
https://reactrouter.com/web/example/url-params

const add = "add";
const remove = "remove";
let { id } = useParams();
const getArray = JSON.parse(localStorage.getItem('favorites'));

Choose a reason for hiding this comment

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

localStorage is not a recommended state management solution for react. I suggest you use context instead.
https://medium.com/@harshdigwani/redux-vs-context-api-vs-local-storage-bced5118c531

import { useEffect, useState } from "react";

export const useFetch = (url) => {
const [state, setState] = useState({items:null, isLoaded:true, hasErrors: false});

Choose a reason for hiding this comment

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

I suggest you separate each state property into its own state variables because when you are calling setState you are overwriting the whole state and it's more error-prone.

@@ -0,0 +1,7 @@
const sum = require('./routine');

test('adds 1 + 2 to equal 3', () => {

Choose a reason for hiding this comment

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

I think this file is not meant to be committed (:

@dianasaurio
Copy link

Also, I don't see any coverage report, let me know if you have it

@israelWL
Copy link
Author

israelWL commented Apr 6, 2021

hi Diana,
this is my coverage report
Screen Shot 2021-04-05 at 23 21 46

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