1
0
mirror of https://github.com/mgerb/go-discord-bot synced 2026-01-23 23:02:48 +00:00

feat: add favorites - update dependencies

This commit is contained in:
2020-06-11 22:41:02 -05:00
parent b7d13ee5fd
commit 58170df201
18 changed files with 3040 additions and 2307 deletions

View File

@@ -26,12 +26,12 @@ export class UploadHistory extends React.Component<IProps, IState> {
}
componentDidMount() {
SoundService.getSounds().then(sounds => {
SoundService.getSounds().then((sounds) => {
this.setState({ sounds });
});
}
renderUploadHistory = (sounds: ISound[], showDiscordPlay: boolean) => {
renderUploadHistory = (sounds: ISound[], hasModPermissions: boolean) => {
const sortedSounds = orderBy(sounds, 'created_at', 'desc');
return (
<div className="card">
@@ -63,7 +63,13 @@ export class UploadHistory extends React.Component<IProps, IState> {
{s.user.email}
</td>
<td>
<ClipPlayerControl showDiscordPlay={showDiscordPlay} sound={s} type="sounds"></ClipPlayerControl>
<ClipPlayerControl
onPlayBrowser={(sound) => SoundService.playAudioInBrowser(sound, 'sounds')}
onPlayDiscord={SoundService.playSound}
hasModPermissions={hasModPermissions}
sound={s}
type="sounds"
></ClipPlayerControl>
</td>
</tr>
);