1
0
mirror of https://github.com/mgerb/go-discord-bot synced 2026-01-11 09:32:50 +00:00

prevent all audio clips from loading on ui - many other small fixes

This commit is contained in:
2017-04-07 22:35:53 -05:00
parent e6c492a5eb
commit 2811d3cc1e
10 changed files with 83 additions and 55 deletions

View File

@@ -35,9 +35,9 @@ export default class Soundboard extends React.Component {
}
onDrop(acceptedFiles, rejectedFiles) {
if (acceptedFiles.length > 0) {
self.uploadFile(acceptedFiles[0]);
}
if (acceptedFiles.length > 0) {
self.uploadFile(acceptedFiles[0]);
}
}
uploadFile(file) {
@@ -47,7 +47,7 @@ export default class Soundboard extends React.Component {
formData.append("password", this.state.password);
axios.put("/upload", formData, this.config)
.then((response) => {
.then(() => {
this.setState({
password: "",
percentCompleted: 0,
@@ -77,18 +77,6 @@ export default class Soundboard extends React.Component {
return (
<div className="Soundboard">
<div className="column">
<div className="Card">
<div className="Card__header">
Discord Sound Bot
</div>
<p>Drag and drop files to upload. The sounds can then be played in discord by typing the commands below.</p>
<p>Check out the source code on
<a href="https://github.com/mgerb/GoBot" target="_blank"> GitHub
<i className="fa fa-github" aria-hidden="true"></i>
</a>
</p>
<p>Follow the readme to set up your own bot!</p>
</div>
<SoundList ref="SoundList"/>
</div>