From 35fdd8de2ba40cbf0c7fc0db0d5d585ef3b15a98 Mon Sep 17 00:00:00 2001 From: Jarda Snajdr Date: Wed, 13 Nov 2019 20:06:21 +0100 Subject: [PATCH] SharingButtonsPreviewButton: add forwardRef flag to connect to make the button reffable (#37570) --- client/my-sites/marketing/buttons/preview-button.jsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/client/my-sites/marketing/buttons/preview-button.jsx b/client/my-sites/marketing/buttons/preview-button.jsx index 0937612099e34..2a0884075e354 100644 --- a/client/my-sites/marketing/buttons/preview-button.jsx +++ b/client/my-sites/marketing/buttons/preview-button.jsx @@ -99,8 +99,11 @@ class SharingButtonsPreviewButton extends React.Component { /* eslint-enable wpcalypso/jsx-classname-namespace */ } -export default connect( state => { - return { +export default connect( + state => ( { path: getCurrentRouteParameterized( state, getSelectedSiteId( state ) ), - }; -} )( SharingButtonsPreviewButton ); + } ), + null, + null, + { forwardRef: true } +)( SharingButtonsPreviewButton );