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

Mini challenge4 #89

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

BigOsvaap
Copy link

No description provided.

Copy link

@dianaatwizeline dianaatwizeline left a comment

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 (
<>

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 (
<>

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

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
2 participants