wire up props with PostStatusModal

emoji-mastoapi
taehoon 5 years ago
parent d6a941a128
commit c8a18f387c

@ -8,7 +8,7 @@ import fileTypeService from '../../services/file_type/file_type.service.js'
import { reject, map, uniqBy } from 'lodash' import { reject, map, uniqBy } from 'lodash'
import suggestor from '../emoji-input/suggestor.js' import suggestor from '../emoji-input/suggestor.js'
const buildMentionsString = ({ user, attentions }, currentUser) => { const buildMentionsString = ({ user, attentions = [] }, currentUser) => {
let allAttentions = [...attentions] let allAttentions = [...attentions]
allAttentions.unshift(user) allAttentions.unshift(user)

@ -12,7 +12,7 @@ const PostStatusModal = {
return this.isLoggedIn && this.$store.state.postStatus.modalActivated return this.isLoggedIn && this.$store.state.postStatus.modalActivated
}, },
params () { params () {
return this.$store.state.postStatus.params return this.$store.state.postStatus.params || {}
} }
}, },
watch: { watch: {

@ -13,6 +13,7 @@
</div> </div>
<PostStatusForm <PostStatusForm
class="panel-body" class="panel-body"
v-bind="params"
@posted="closeModal" @posted="closeModal"
/> />
</div> </div>

Loading…
Cancel
Save