No device warning

Reviewed By: LukeDefeo

Differential Revision: D47473652

fbshipit-source-id: d4fe51c20cb555d3701aa112ccf3ea9edd23c903
This commit is contained in:
Anton Kastritskiy
2023-07-18 03:52:34 -07:00
committed by Facebook GitHub Bot
parent b1be5d79c8
commit 5d2284ce4a

View File

@@ -8,9 +8,9 @@
*/ */
import React from 'react'; import React from 'react';
import {RocketOutlined} from '@ant-design/icons'; import {RocketOutlined, WarningOutlined} from '@ant-design/icons';
import {Alert, Typography} from 'antd'; import {Alert, Tooltip, Typography} from 'antd';
import {useTrackedCallback} from 'flipper-plugin'; import {useTrackedCallback, Layout, theme} from 'flipper-plugin';
import {showEmulatorLauncher} from './LaunchEmulator'; import {showEmulatorLauncher} from './LaunchEmulator';
import {useStore} from '../../utils/useStore'; import {useStore} from '../../utils/useStore';
@@ -28,14 +28,16 @@ export function NoDevices() {
); );
return ( return (
<Tooltip
title={
<Alert <Alert
type="info" type="info"
message={ message={
<> <>
<Title level={4}>No devices found</Title> <Title level={4}>No devices found</Title>
<Text> <Text>
Start a fresh emulator <RocketOutlined onClick={onLaunchEmulator} />{' '} Start a fresh emulator{' '}
or check the{' '} <RocketOutlined onClick={onLaunchEmulator} /> or check the{' '}
<Link href="https://fbflipper.com/docs/getting-started/troubleshooting/"> <Link href="https://fbflipper.com/docs/getting-started/troubleshooting/">
troubleshooting guide troubleshooting guide
</Link> </Link>
@@ -44,5 +46,11 @@ export function NoDevices() {
</> </>
} }
/> />
}>
<Layout.Container
style={{alignItems: 'center', justifyContent: 'space-around'}}>
<WarningOutlined style={{fontSize: 32, color: theme.warningColor}} />
</Layout.Container>
</Tooltip>
); );
} }