| 1 | import { |
| 2 | connectionStatusText, |
| 3 | type EnvironmentConnectionPresentation, |
| 4 | } from "@t3tools/client-runtime/connection"; |
| 5 | |
| 6 | /** |
| 7 | * Status line for mobile environment rows. Mobile has no tooltip like web, so |
| 8 | * an unsupported environment shows its compatibility detail, which says |
| 9 | * whether to update the app or the host. |
| 10 | */ |
| 11 | export function environmentStatusText(connection: EnvironmentConnectionPresentation): string { |
| 12 | return connection.phase === "unsupported" && connection.error !== null |
| 13 | ? connection.error |
| 14 | : connectionStatusText(connection); |
| 15 | } |