Scaffolding

Summary:
Scaffolding connectivity hub. The final place may be different though.

But at least for now whilst we iterate on the solution, this should be enough.

Reviewed By: passy

Differential Revision: D47230905

fbshipit-source-id: e3b3f7d773e1bf8b0dd9821cf25c6fa8e77669f4
This commit is contained in:
Lorenzo Blasa
2023-07-06 06:57:53 -07:00
committed by Facebook GitHub Bot
parent 9810edcdfb
commit 87c5296cd8
3 changed files with 44 additions and 1 deletions

View File

@@ -44,11 +44,13 @@ import {isFBEmployee} from '../utils/fbEmployee';
import {notification} from 'antd';
import isProduction from '../utils/isProduction';
import {getRenderHostInstance} from 'flipper-frontend-core';
import {ConnectionTroubleshootTools} from '../chrome/ConnectionTroubleshootTools';
export type ToplevelNavItem =
| 'appinspect'
| 'flipperlogs'
| 'notification'
| 'connectivity'
| undefined;
export type ToplevelProps = {
toplevelSelection: ToplevelNavItem;
@@ -64,7 +66,7 @@ export function SandyApp() {
const staticView = useStore((state) => state.connections.staticView);
/**
* top level navigation uses two pieces of state, selection stored here, and selection that is based on what is stored in the reducer (which might be influenced by redux action dispatches to different means).
* Top level navigation uses two pieces of state, selection stored here, and selection that is based on what is stored in the reducer (which might be influenced by redux action dispatches to different means).
* The logic here is to sync both, but without modifying the navigation related reducers to not break classic Flipper.
* It is possible to simplify this in the future.
*/
@@ -88,6 +90,9 @@ export function SandyApp() {
case 'flipperlogs':
dispatch(setStaticView(FlipperDevTools));
break;
case 'connectivity':
dispatch(setStaticView(ConnectionTroubleshootTools));
break;
default:
}
setStoredToplevelSelection(newSelection);