UNPKG

@sanity/assist

Version:

You create the instructions; Sanity AI Assist does the rest.

15 lines (10 loc) 351 B
import {useContext} from 'react' import {ConnectorsStore} from './ConnectorsStore' import {ConnectorsStoreContext} from './ConnectorsStoreContext' export function useConnectorsStore(): ConnectorsStore { const store = useContext(ConnectorsStoreContext) if (!store) { throw new Error('Missing connectors store context') } return store }