diff --git a/src/WhatsappShareButton.ts b/src/WhatsappShareButton.ts index e43aa161..b7e198bb 100644 --- a/src/WhatsappShareButton.ts +++ b/src/WhatsappShareButton.ts @@ -2,16 +2,10 @@ import assert from './utils/assert'; import objectToGetParams from './utils/objectToGetParams'; import createShareButton from './hocs/createShareButton'; -function isMobileOrTablet() { - return /(android|iphone|ipad|mobile)/i.test(navigator.userAgent); -} - function whatsappLink(url: string, { title, separator }: { title?: string; separator?: string }) { assert(url, 'whatsapp.url'); return ( - 'https://' + - (isMobileOrTablet() ? 'api' : 'web') + - '.whatsapp.com/send' + + 'https://api.whatsapp.com/send' + objectToGetParams({ text: title ? title + separator + url : url, })