mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-23 14:07:20 +03:00
fix: suggestions update
This commit is contained in:
parent
ce5b5b4c98
commit
089d271e02
@ -495,8 +495,7 @@ class CarouselSidebarData extends React.Component {
|
||||
};
|
||||
|
||||
_handleTagDelete = async (tag) => {
|
||||
const response = UserBehaviors.deleteTag(tag);
|
||||
|
||||
const response = await UserBehaviors.deleteTag(tag);
|
||||
if (response.success) {
|
||||
this.props.onUpdateViewer({ tags: response.tags });
|
||||
this.updateSuggestions();
|
||||
|
@ -349,10 +349,10 @@ export default class CarouselSidebarSlate extends React.Component {
|
||||
};
|
||||
|
||||
_handleTagDelete = async (tag) => {
|
||||
const response = await Actions.deleteTag({ tag });
|
||||
|
||||
const response = await UserBehaviors.deleteTag(tag);
|
||||
if (response.success) {
|
||||
this.setState({ suggestions: response.tags });
|
||||
this.props.onUpdateViewer({ tags: response.tags });
|
||||
this.updateSuggestions();
|
||||
}
|
||||
|
||||
if (Events.hasError(response)) {
|
||||
|
@ -76,10 +76,13 @@ export default class SidebarSingleSlateSettings extends React.Component {
|
||||
slate.data.tags = this.state.tags;
|
||||
|
||||
this.props.onUpdateViewer({ slates, tags: this.state.suggestions });
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
this.updateSuggestions();
|
||||
|
||||
this.props.onCancel();
|
||||
const response = await Actions.updateSlate({
|
||||
id: this.props.data.id,
|
||||
@ -128,10 +131,10 @@ export default class SidebarSingleSlateSettings extends React.Component {
|
||||
};
|
||||
|
||||
_handleTagDelete = async (tag) => {
|
||||
const response = await Actions.deleteTag({ tag });
|
||||
|
||||
const response = await UserBehaviors.deleteTag(tag);
|
||||
if (response.success) {
|
||||
this.setState({ suggestions: response.tags });
|
||||
this.props.onUpdateViewer({ tags: response.tags });
|
||||
this.updateSuggestions();
|
||||
}
|
||||
|
||||
if (Events.hasError(response)) {
|
||||
|
Loading…
Reference in New Issue
Block a user