-
Notifications
You must be signed in to change notification settings - Fork 95
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
base: master
Are you sure you want to change the base?
Mini challenge4 #89
Conversation
There was a problem hiding this 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 ( | ||
<> |
There was a problem hiding this comment.
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 ( | ||
<> |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
No description provided.