Hide details when clicking upvote/downvote
This commit is contained in:
parent
c19bd60174
commit
66b110e9ef
@ -29,11 +29,15 @@ export function fetchReports({ commit }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function downvote({ commit }, { id }) {
|
export function downvote({ commit }, { id }) {
|
||||||
|
// Hide details
|
||||||
|
commit(SHOW_REPORT_DETAILS, { id: null, userAsked: null });
|
||||||
return api.downvote(id)
|
return api.downvote(id)
|
||||||
.then(report => commit(PUSH_REPORT, { report }));
|
.then(report => commit(PUSH_REPORT, { report }));
|
||||||
}
|
}
|
||||||
|
|
||||||
export function upvote({ commit }, { id }) {
|
export function upvote({ commit }, { id }) {
|
||||||
|
// Hide details
|
||||||
|
commit(SHOW_REPORT_DETAILS, { id: null, userAsked: null });
|
||||||
return api.upvote(id)
|
return api.upvote(id)
|
||||||
.then(report => commit(PUSH_REPORT, { report }));
|
.then(report => commit(PUSH_REPORT, { report }));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user