Migrated UpdateIndicator

Summary: Migrated UpdateIndicator.js to UpdateIndicator.tsx

Reviewed By: passy

Differential Revision: D16668962

fbshipit-source-id: 32861327daa926b9dd53ff2c7c46ade164c09ccb
This commit is contained in:
Benjamin Elo
2019-08-08 05:55:39 -07:00
committed by Facebook Github Bot
parent 48db6b7b58
commit d9209113be
2 changed files with 5 additions and 6 deletions

View File

@@ -29,7 +29,7 @@ import RatingButton from './RatingButton.js';
import DevicesButton from './DevicesButton.js'; import DevicesButton from './DevicesButton.js';
import ScreenCaptureButtons from './ScreenCaptureButtons.js'; import ScreenCaptureButtons from './ScreenCaptureButtons.js';
import AutoUpdateVersion from './AutoUpdateVersion'; import AutoUpdateVersion from './AutoUpdateVersion';
import UpdateIndicator from './UpdateIndicator.js'; import UpdateIndicator from './UpdateIndicator';
import config from '../fb-stubs/config.js'; import config from '../fb-stubs/config.js';
import {isAutoUpdaterEnabled} from '../utils/argvUtils.js'; import {isAutoUpdaterEnabled} from '../utils/argvUtils.js';
import isProduction from '../utils/isProduction.js'; import isProduction from '../utils/isProduction.js';

View File

@@ -5,8 +5,9 @@
* @format * @format
*/ */
import type {LauncherMsg} from '../reducers/application.js'; import {LauncherMsg} from '../reducers/application.js';
import {colors, Component, FlexRow, Glyph, styled} from 'flipper'; import {colors, FlexRow, Glyph, styled} from 'flipper';
import React, {Component} from 'react';
const Container = styled(FlexRow)({ const Container = styled(FlexRow)({
alignItems: 'center', alignItems: 'center',
@@ -24,11 +25,9 @@ function getSeverityColor(severity: 'warning' | 'error'): string {
case 'error': case 'error':
return colors.cherry; return colors.cherry;
} }
// Flow isn't smart enough to see that the above is already exhaustive.
return '';
} }
export default class UpdateIndicator extends Component<Props, void> { export default class UpdateIndicator extends Component<Props> {
render() { render() {
if (this.props.launcherMsg.message.length == 0) { if (this.props.launcherMsg.message.length == 0) {
return null; return null;