mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
improve modification logic
This commit is contained in:
parent
2e627a2b71
commit
1ae44d6c86
@ -138,13 +138,15 @@ export default (props) => {
|
||||
<antd.Divider />
|
||||
|
||||
<div className="field">
|
||||
<antd.Button
|
||||
onClick={props.onDeletePlaylist}
|
||||
icon={<Icons.MdDelete />}
|
||||
danger
|
||||
>
|
||||
Delete Playlist
|
||||
</antd.Button>
|
||||
{
|
||||
props.playlist._id && <antd.Button
|
||||
onClick={props.onDeletePlaylist}
|
||||
icon={<Icons.MdDelete />}
|
||||
danger
|
||||
>
|
||||
Delete Playlist
|
||||
</antd.Button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -121,6 +121,10 @@ export default class PlaylistCreatorSteps extends React.Component {
|
||||
if (result) {
|
||||
app.message.success("Playlist published")
|
||||
|
||||
if (typeof this.props.onModification === "function") {
|
||||
this.props.onModification()
|
||||
}
|
||||
|
||||
if (typeof this.props.close === "function") {
|
||||
this.props.close()
|
||||
}
|
||||
@ -250,6 +254,10 @@ export default class PlaylistCreatorSteps extends React.Component {
|
||||
if (result) {
|
||||
app.message.success("Playlist deleted")
|
||||
|
||||
if (typeof this.props.onModification === "function") {
|
||||
this.props.onModification()
|
||||
}
|
||||
|
||||
if (typeof this.props.close === "function") {
|
||||
this.props.close()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user