teableio/teable

View on GitHub
packages/sdk/src/hooks/use-connection.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { useContext } from 'react';
import { ConnectionContext } from '../context/app/ConnectionContext';

export function useConnection() {
  const { connection, connected } = useContext(ConnectionContext);
  return { connection, connected };
}