mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
fix typo shareWith -> shareVia
This commit is contained in:
@@ -32,8 +32,8 @@ export default class ShareButton extends React.Component {
|
||||
this.dropdownClicked = true
|
||||
}
|
||||
ReactDOM.findDOMNode(this.refs.dropdown).addEventListener('click', this.dropdownInterceptor)
|
||||
this.shareWithPublicURLHandler = e => {
|
||||
this.handleShareWithPublicURLClick(e)
|
||||
this.shareViaPublicURLHandler = e => {
|
||||
this.handleShareViaPublicURLClick(e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ export default class ShareButton extends React.Component {
|
||||
this.setState({openDropdown: false})
|
||||
}
|
||||
|
||||
handleShareWithPublicURLClick (e) {
|
||||
handleShareViaPublicURLClick (e) {
|
||||
let { user } = this.props
|
||||
let input = Object.assign({}, this.props.article, {
|
||||
clientKey: clientKey.get(),
|
||||
@@ -76,7 +76,7 @@ export default class ShareButton extends React.Component {
|
||||
isSharing: true,
|
||||
failed: false
|
||||
}, () => {
|
||||
api.shareWithPublicURL(input)
|
||||
api.shareViaPublicURL(input)
|
||||
.then(res => {
|
||||
let url = res.body.url
|
||||
this.setState({url: url, isSharing: false})
|
||||
@@ -115,10 +115,10 @@ export default class ShareButton extends React.Component {
|
||||
{
|
||||
!hasPublicURL ? (
|
||||
<button
|
||||
onClick={e => this.shareWithPublicURLHandler(e)}
|
||||
onClick={e => this.shareViaPublicURLHandler(e)}
|
||||
ref='sharePublicURL'
|
||||
disabled={this.state.isSharing}>
|
||||
<i className='fa fa-fw fa-external-link'/> {this.state.failed ? 'Failed : Click to Try again' : !this.state.isSharing ? 'Share with public URL' : 'Sharing...'}
|
||||
<i className='fa fa-fw fa-external-link'/> {this.state.failed ? 'Failed : Click to Try again' : !this.state.isSharing ? 'Share via public URL' : 'Sharing...'}
|
||||
</button>
|
||||
) : (
|
||||
<div className='ShareButton-url'>
|
||||
|
||||
@@ -7,7 +7,7 @@ export const SERVER_URL = 'https://b00st.io/'
|
||||
|
||||
export const request = superagentPromise(superagent, Promise)
|
||||
|
||||
export function shareWithPublicURL (input) {
|
||||
export function shareViaPublicURL (input) {
|
||||
return request
|
||||
.post(SERVER_URL + 'apis/share')
|
||||
// .set({
|
||||
@@ -18,5 +18,5 @@ export function shareWithPublicURL (input) {
|
||||
|
||||
export default {
|
||||
SERVER_URL,
|
||||
shareWithPublicURL
|
||||
shareViaPublicURL
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user