import { buildAppUrl } from '../../shared/urls'
import { apps } from '../state'
import {
EmptyState,
StatusDot,
UrlLeft,
UrlLink,
UrlList,
UrlPort,
UrlRow,
} from '../styles'
export function Urls() {
const nonTools = apps.filter(a => !a.tool)
if (nonTools.length === 0) {
return No apps installed
}
return (
{nonTools.map(app => {
const url = buildAppUrl(app.name, location.origin)
const running = app.state === 'running'
return (
{app.icon}
{running ? (
{url}
) : (
{app.name}
)}
{app.port ? :{app.port} : null}
)
})}
)
}