From 3d898957e3dfa55981e2186d0daf7b6059cc868b Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 14 May 2022 11:21:12 -0500 Subject: [PATCH 1/4] ActionButton: put remote follow behind feature detection --- .../features/ui/components/action-button.tsx | 41 +++++++++++++------ app/soapbox/utils/features.ts | 6 +++ 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/app/soapbox/features/ui/components/action-button.tsx b/app/soapbox/features/ui/components/action-button.tsx index e79c225672..c710f43d96 100644 --- a/app/soapbox/features/ui/components/action-button.tsx +++ b/app/soapbox/features/ui/components/action-button.tsx @@ -105,10 +105,9 @@ const ActionButton = ({ account, actionType, small }: iActionButton) => { ); }; - const empty = <>; - - if (!me) { - // Remote follow + /** Render a remote follow button, depending on features. */ + const renderRemoteFollow = (): JSX.Element | null => { + // Remote follow through the API. if (features.remoteInteractionsAPI) { return (