Wolfgang Huß 472bfc2a88 Used PostMutations in PostHelpers now
Co-Authored-By: mattwr18 <mattwr18@gmail.com>
2019-06-14 18:44:56 +02:00

36 lines
812 B
JavaScript

import PostMutations from '~/graphql/PostMutations.js'
export function postMenuModalsData(truncatedPostName, confirmCallback, cancelCallback = () => {}) {
return {
delete: {
titleIdent: 'delete.contribution.title',
messageIdent: 'delete.contribution.message',
messageParams: {
name: truncatedPostName,
},
buttons: {
confirm: {
danger: true,
icon: 'trash',
textIdent: 'delete.submit',
callback: confirmCallback,
},
cancel: {
icon: 'close',
textIdent: 'delete.cancel',
callback: cancelCallback,
},
},
},
}
}
export function deletePostMutation(postId) {
return {
mutation: PostMutations().DeletePost,
variables: {
id: postId,
},
}
}