import * as atoms from '../constants/atom' ; import { useAtomDevtools } from 'jotai/devtools' ; if ( process . env . NODE_ENV !== 'production' ) { Object . entries ( atoms ) . forEach ( ( [ key , a ] ) => { if ( typeof a === 'object' && 'scope' in a ) { a . scope === atoms . _hexxScope ; a . debugLabel = key ; } } ) ; } export function useEditorDevTool ( ) { useAtomDevtools ( atoms . uiStateAtom ) ; useAtomDevtools ( atoms . blocksAtom ) ; } export function HexxDevTool ( ) { return typeof window !== 'undefined' && window . __REDUX_DEVTOOLS_EXTENSION__ ? ( < ReduxDevtool />) : null; } function ReduxDevtool ( ) { useEditorDevTool ( ) ; return null ; }