Skip to content

Commit

Permalink
remove initOShare
Browse files Browse the repository at this point in the history
  • Loading branch information
abshirahmed committed Jul 6, 2023
1 parent f271cf2 commit dfc7aae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 0 additions & 6 deletions components/x-gift-article/src/GiftArticle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import * as updaters from './lib/updaters'
import { ShareType } from './lib/constants'
import ShareArticleDialog from './v2/ShareArticleDialog'
import Form from './Form'
import oShare from '@financial-times/o-share/main'

const isCopySupported =
typeof document !== 'undefined' && document.queryCommandSupported && document.queryCommandSupported('copy')
Expand Down Expand Up @@ -242,11 +241,6 @@ const withGiftFormActions = withActions(
showHighlightsSuccessMessage: false
}
}
},
initOShare(selector) {
return () => {
return new oShare(document.querySelector(selector))
}
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion components/x-gift-article/src/v2/CreateLinkButton.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { h } from '@financial-times/x-engine'
import { ShareType } from '../lib/constants'
import oShare from '@financial-times/o-share/main'

export const CreateLinkButton = ({ shareType, actions, enterpriseEnabled }) => {
const createLinkHandler = async () => {
Expand All @@ -15,7 +16,7 @@ export const CreateLinkButton = ({ shareType, actions, enterpriseEnabled }) => {
break
default:
}
actions.initOShare('#social-share-buttons')
new oShare(document.querySelector('#social-share-buttons'))
}
return (
<button
Expand Down

0 comments on commit dfc7aae

Please sign in to comment.