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
This commit is contained in:
Michel Weststrate
2021-01-22 09:12:30 -08:00
committed by Facebook GitHub Bot
parent d3430e067f
commit ba74b074c2

View File

@@ -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,
});
}
});
}
}, []);