Skip to content

Commit 529c27a

Browse files
committed
fix typo shareWith -> shareVia
1 parent 70fc0af commit 529c27a

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

browser/main/HomePage/ArticleDetail/ShareButton.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ export default class ShareButton extends React.Component {
3232
this.dropdownClicked = true
3333
}
3434
ReactDOM.findDOMNode(this.refs.dropdown).addEventListener('click', this.dropdownInterceptor)
35-
this.shareWithPublicURLHandler = e => {
36-
this.handleShareWithPublicURLClick(e)
35+
this.shareViaPublicURLHandler = e => {
36+
this.handleShareViaPublicURLClick(e)
3737
}
3838
}
3939

@@ -66,7 +66,7 @@ export default class ShareButton extends React.Component {
6666
this.setState({openDropdown: false})
6767
}
6868

69-
handleShareWithPublicURLClick (e) {
69+
handleShareViaPublicURLClick (e) {
7070
let { user } = this.props
7171
let input = Object.assign({}, this.props.article, {
7272
clientKey: clientKey.get(),
@@ -76,7 +76,7 @@ export default class ShareButton extends React.Component {
7676
isSharing: true,
7777
failed: false
7878
}, () => {
79-
api.shareWithPublicURL(input)
79+
api.shareViaPublicURL(input)
8080
.then(res => {
8181
let url = res.body.url
8282
this.setState({url: url, isSharing: false})
@@ -115,10 +115,10 @@ export default class ShareButton extends React.Component {
115115
{
116116
!hasPublicURL ? (
117117
<button
118-
onClick={e => this.shareWithPublicURLHandler(e)}
118+
onClick={e => this.shareViaPublicURLHandler(e)}
119119
ref='sharePublicURL'
120120
disabled={this.state.isSharing}>
121-
<i className='fa fa-fw fa-external-link'/> {this.state.failed ? 'Failed : Click to Try again' : !this.state.isSharing ? 'Share with public URL' : 'Sharing...'}
121+
<i className='fa fa-fw fa-external-link'/> {this.state.failed ? 'Failed : Click to Try again' : !this.state.isSharing ? 'Share via public URL' : 'Sharing...'}
122122
</button>
123123
) : (
124124
<div className='ShareButton-url'>

lib/api.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const SERVER_URL = 'https://b00st.io/'
77

88
export const request = superagentPromise(superagent, Promise)
99

10-
export function shareWithPublicURL (input) {
10+
export function shareViaPublicURL (input) {
1111
return request
1212
.post(SERVER_URL + 'apis/share')
1313
// .set({
@@ -18,5 +18,5 @@ export function shareWithPublicURL (input) {
1818

1919
export default {
2020
SERVER_URL,
21-
shareWithPublicURL
21+
shareViaPublicURL
2222
}

0 commit comments

Comments
 (0)