import React from 'react' ; import { useStore } from 'shared/libs/stores' ; import ConsoleContext from './consoleContext' ; export const ConsoleReactContext = React . createContext < ConsoleContext > ( null ) ; const ConsoleContextProvider = props => { return < ConsoleReactContext . Provider { ... props } / > ; } ; export default ConsoleContextProvider ; export function useConsoleContext ( ) { const ctx = React . useContext ( ConsoleReactContext ) ; window [ 'teleconsole' ] = ctx ; return ctx ; } export function useStoreDocs ( ctx ) { return useStore ( ctx . storeDocs ) ; }