1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-15 18:56:22 +00:00

submit user name

This commit is contained in:
Rokt33r
2015-12-13 14:25:50 +09:00
parent 24e2544544
commit 0e8edf0c72
2 changed files with 13 additions and 3 deletions

View File

@@ -65,7 +65,11 @@ export default class ShareButton extends React.Component {
}
handleShareWithPublicURLClick (e) {
let input = Object.assign({}, this.props.article, {clientKey: clientKey.get()})
let { user } = this.props
let input = Object.assign({}, this.props.article, {
clientKey: clientKey.get(),
writerName: user.name
})
api.shareWithPublicURL(input)
.then(res => {
let url = res.body.url
@@ -131,5 +135,8 @@ export default class ShareButton extends React.Component {
ShareButton.propTypes = {
article: PropTypes.shape({
publicURL: PropTypes.string
}),
user: PropTypes.shape({
name: PropTypes.string
})
}