Files
flipper/src/utils/launcher.js
Pascal Hartig ad4c2092a5 Replace launcher error bar with titlebar indicator
Summary:
When starting Flipper with `--launcher-msg`, it currently shows a red error bar at the bottom. That's not ideal for various reasons including it looking kinda bad and it only supporting a single error (the last one set).

This instead adds an action that shows an indicator next to the version at the top as we had it before with the previous system.

Reviewed By: danielbuechele

Differential Revision: D14778859

fbshipit-source-id: 28591de6262e090a4e59a7f5a8cd86d7b3abf8fe
2019-04-05 06:47:14 -07:00

22 lines
543 B
JavaScript

/**
* Copyright 2018-present Facebook.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @format
*/
import type {ProcessConfig} from './processConfig.js';
import type {Store} from '../reducers/index.js';
export function initLauncherHooks(config: ProcessConfig, store: Store) {
if (config.launcherMsg) {
store.dispatch({
type: 'LAUNCHER_MSG',
payload: {
severity: 'warning',
message: config.launcherMsg,
},
});
}
}