Reduce sign in errors

Summary:
A lot of the errors in our monitoring / logs are mere sign in errors. Many of them are unnecessary as they are features triggered automatically even when the user isn't logged in.

This diff improves error handling and prevents requires from being made / features from being used by introducing a `<RequireLogin>` component that will hide an underlying feature if the user isn't logged in.

This also prevents the support request form from failing after the user has filled in all details.

This also fixes an issue where mobilebuilds plugin didn't refresh after the user did log in.

From our monitoring error 1,9 and 10:

{F350458668}

Reviewed By: jknoxville

Differential Revision: D25494356

fbshipit-source-id: 95701381bb74c27b9ea9658dc4df678e5f0710e0
This commit is contained in:
Michel Weststrate
2020-12-14 01:59:50 -08:00
committed by Facebook GitHub Bot
parent 379339b03b
commit 2ad81f2c63
4 changed files with 62 additions and 7 deletions

View File

@@ -21,6 +21,7 @@ export {
internGraphGETAPIRequest,
internGraphPOSTAPIRequest,
graphQLQuery,
isLoggedIn,
} from './fb-stubs/user';
export {
FlipperBasePlugin,
@@ -203,3 +204,4 @@ export {default as SidebarExtensions} from './fb-stubs/LayoutInspectorSidebarExt
export {IDEFileResolver, IDEType} from './fb-stubs/IDEFileResolver';
export {renderMockFlipperWithPlugin} from './test-utils/createMockFlipperWithPlugin';
export {Tracked} from 'flipper-plugin'; // To be able to use it in legacy plugins
export {RequireLogin} from './ui/components/RequireLogin';