Skip to content

Mini challenge4#89

Open
BigOsvaap wants to merge 12 commits into
cvillanueva84:masterfrom
BigOsvaap:mini-challenge4
Open

Mini challenge4#89
BigOsvaap wants to merge 12 commits into
cvillanueva84:masterfrom
BigOsvaap:mini-challenge4

Conversation

@BigOsvaap

Copy link
Copy Markdown

No description provided.

@dianaatwizeline dianaatwizeline left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good job on this PR. Keep it up!

const urlVideo = `/watch?v=${id}`;

return (
<>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think you can remove <> because <LinkVideo> is wrapping everything else

}, [videos]);

return (
<>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same comment here, you can remove <>. You only need the empty brackets when there is not one single parent element.

`;

export function CardVideoBottom({ title, description }) {
function trucateText(text) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It is better that this function lives outside the component
or
to not have this function definition at all and have a constant for truncated text const truncatedText = text.length [...]

the advantage of either of these options is that then the function would not be redefined with every render

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.

2 participants