diff --git a/components/x-gift-article/package.json b/components/x-gift-article/package.json index fd3b1566e..5ee8253bc 100644 --- a/components/x-gift-article/package.json +++ b/components/x-gift-article/package.json @@ -48,7 +48,7 @@ "@financial-times/o-loading": "^5.2.1", "@financial-times/o-message": "^5.4.2", "@financial-times/o-normalise": "^3.2.2", - "@financial-times/o-share": "^9.0.2", + "@financial-times/o-share": "^10.0.0", "@financial-times/o-typography": "^7.4.1" } } diff --git a/components/x-gift-article/src/ShareArticleDialog.scss b/components/x-gift-article/src/ShareArticleDialog.scss index da8efe7f3..814d72c07 100644 --- a/components/x-gift-article/src/ShareArticleDialog.scss +++ b/components/x-gift-article/src/ShareArticleDialog.scss @@ -49,7 +49,7 @@ ), $types: ('action', 'alert')); @include oShare($opts: ( - 'icons': ('twitter', 'facebook', 'linkedin', 'mail', 'whatsapp') + 'icons': ('x', 'facebook', 'linkedin', 'mail', 'whatsapp') )); @include oIcons($opts: ( diff --git a/components/x-gift-article/src/SocialShareButtons.jsx b/components/x-gift-article/src/SocialShareButtons.jsx index 6b4394f5d..233e1673d 100644 --- a/components/x-gift-article/src/SocialShareButtons.jsx +++ b/components/x-gift-article/src/SocialShareButtons.jsx @@ -1,14 +1,7 @@ import { h } from '@financial-times/x-engine' import { ShareType } from './lib/constants' -export const SocialShareButtons = ({ - actions, - mailtoUrl, - shareType, - enterpriseEnabled, - url, - article -}) => { +export const SocialShareButtons = ({ actions, mailtoUrl, shareType, enterpriseEnabled, url, article }) => { const onClickHandler = (event) => { switch (shareType) { case ShareType.gift: @@ -25,19 +18,17 @@ export const SocialShareButtons = ({ } const mobileShareLinks = { - facebook: `http://www.facebook.com/sharer.php?u=${encodeURIComponent( - url - )}&t=${encodeURIComponent(article.title)}`, - twitter: `https://twitter.com/intent/tweet?url=${encodeURIComponent( - url - )}&text=${encodeURIComponent(article.title)}&via=financialtimes`, + facebook: `http://www.facebook.com/sharer.php?u=${encodeURIComponent(url)}&t=${encodeURIComponent( + article.title + )}`, + twitter: `https://twitter.com/intent/tweet?url=${encodeURIComponent(url)}&text=${encodeURIComponent( + article.title + )}&via=financialtimes`, linkedin: `http://www.linkedin.com/shareArticle?mini=true&url=${encodeURIComponent( url )}&title=${encodeURIComponent(article.title)}&source=Financial+Times`, - whatsapp: `whatsapp://send?text=${encodeURIComponent(article.title)}%20-%20${encodeURIComponent( - url - )}` - }; + whatsapp: `whatsapp://send?text=${encodeURIComponent(article.title)}%20-%20${encodeURIComponent(url)}` + } return (
@@ -46,17 +37,17 @@ export const SocialShareButtons = ({