Convert to UseIdeContext

related to #360
This commit is contained in:
Kurt Hutten
2021-06-13 06:23:36 +10:00
parent c142860433
commit d781c94027
7 changed files with 19 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
import { useContext, useRef, useEffect } from 'react'
import { useRef, useEffect } from 'react'
import { Mosaic, MosaicWindow } from 'react-mosaic-component'
import { IdeContext } from 'src/pages/DevIdePage/DevIdePage'
import { useIdeContext } from 'src/helpers/hooks/useIdeContext'
import { requestRender } from 'src/helpers/hooks/useIdeState'
import IdeEditor from 'src/components/IdeEditor'
import IdeViewer from 'src/components/IdeViewer'
@@ -15,7 +15,7 @@ const ELEMENT_MAP = {
}
const IdeContainer = () => {
const { state, thunkDispatch } = useContext(IdeContext)
const { state, thunkDispatch } = useIdeContext()
const viewerDOM = useRef(null)
const debounceTimeoutId = useRef