import Constants from 'expo-constants'; import { Row, View, Text, Spacer } from 'expo-dev-client-components'; import React from 'react'; import { StyleSheet } from 'react-native'; import DevIndicator from '../components/DevIndicator'; import FriendlyUrls from '../legacy/FriendlyUrls'; type Props = { task: { manifestUrl: string; manifestString: string }; }; export function DevMenuServerInfo({ task }: Props) { const manifest = task.manifestString ? (JSON.parse(task.manifestString) as typeof Constants.manifest | typeof Constants.manifest2) : null; const taskUrl = task.manifestUrl ? FriendlyUrls.toFriendlyString(task.manifestUrl) : ''; const devServerName = manifest && 'extra' in manifest && manifest.extra?.expoGo?.developer ? manifest.extra.expoGo.developer.tool : null; return ( {devServerName ? ( <> Connected to {devServerName} ) : null} {devServerName ? ( ) : null} {taskUrl} ); } const styles = StyleSheet.create({ taskDevServerIndicator: { marginRight: 8, }, });