-
-
Notifications
You must be signed in to change notification settings - Fork 290
Feature: added playlist duration badge #1130
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
Feature: added playlist duration badge #1130
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| return <Badge {...props}>{isLoading ? <SpinnerIcon /> : children}</Badge>; | ||
| }; | ||
|
|
||
| interface PlayListDurationBadgeProps { |
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.
There is already format-duration (and formatDurationString), it would be more appropriate to use one of the existing tools to get the duration.
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.
Hi, I made the change with formatDurationString, but in my opinion it would be more useful to view #1131 as it already incorporates my change and close my pr.
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 misunderstood? #1131 is a feature request, not a PR.
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.
| time?: null | number; | ||
| } | ||
|
|
||
| const PlayListDurationBadge = ({ time }: PlayListDurationBadgeProps) => { |
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.
Not sure why this is a separate component? This could be easily inlined to the playlist component.
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.
Hi, the idea was to make the display of the playlist duration optional via a setting, which was subsequently removed because it was effectively useless.
I pushed the new version without the component.
Adds a badge with the playlist duration next to the playlist title.