From ba74b074c28d6cab42c4b04b4c3c2a3c5f664e26 Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Fri, 22 Jan 2021 09:12:30 -0800 Subject: [PATCH] Fix employee detection in OSS version Summary: Changelog: Fix incorrect warning in OSS builds hinting to install a closed source build. Fixes #1853 Reviewed By: passy Differential Revision: D26019227 fbshipit-source-id: 61a0270997d0aa67d55224e4f6268ed3103099c7 --- desktop/app/src/chrome/AppWrapper.tsx | 28 ++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/desktop/app/src/chrome/AppWrapper.tsx b/desktop/app/src/chrome/AppWrapper.tsx index 09053c39d..38979c07f 100644 --- a/desktop/app/src/chrome/AppWrapper.tsx +++ b/desktop/app/src/chrome/AppWrapper.tsx @@ -23,19 +23,21 @@ type Props = {logger: Logger}; export default function App(props: Props) { useEffect(() => { if (fbConfig.warnFBEmployees && isProduction()) { - isFBEmployee().then(() => { - notification.warning({ - placement: 'bottomLeft', - message: 'Please use Flipper@FB', - description: ( - <> - You are using the open-source version of Flipper. Install the - internal build from Managed Software Center to get access to more - plugins. - - ), - duration: null, - }); + isFBEmployee().then((isEmployee) => { + if (isEmployee) { + notification.warning({ + placement: 'bottomLeft', + message: 'Please use Flipper@FB', + description: ( + <> + You are using the open-source version of Flipper. Install the + internal build from Managed Software Center to get access to + more plugins. + + ), + duration: null, + }); + } }); } }, []);