Skip to content

Commit 80e6ec1

Browse files
committed
refactor: update connection status handling in GatewayTerminal component
- Changed the connection status variable from `isConnected` to `status` for better clarity. - Derived `isConnected` from the `status` to streamline the connection logic in the GatewayTerminal component.
1 parent e8219cd commit 80e6ec1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

components/gateway-terminal.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,8 @@ function EntryView({ entry }: { entry: TerminalEntry }) {
316316
// ─── Main component ──────────────────────────────────────
317317

318318
export function GatewayTerminal() {
319-
const { isConnected, sendRequest, onEvent } = useGateway()
319+
const { status, sendRequest, onEvent } = useGateway()
320+
const isConnected = status === 'connected'
320321

321322
const [entries, setEntries] = useState<TerminalEntry[]>([])
322323
const [input, setInput] = useState('')

0 commit comments

Comments
 (0)