| 1 | import { useWorkspaceEnvironments } from "../../state/workspace"; |
| 2 | |
| 3 | export function usePullRequestConnected(environmentId: string) { |
| 4 | return useWorkspaceEnvironments().some( |
| 5 | (environment) => |
| 6 | environment.environmentId === environmentId && environment.connectionState === "connected", |
| 7 | ); |
| 8 | } |