adding eslint-plugin-react-hooks plugin and fixing 1 error

This commit is contained in:
Dan 2022-02-14 13:33:52 +00:00 committed by Aria
parent 93d1cfa5ec
commit 72c7b2b9ce
4 changed files with 13 additions and 5 deletions

View file

@ -11,9 +11,8 @@ const EditorHelper = <T extends ElementType>({
component: Component,
...props
}: EditorHelperProps<T>) => {
const helpersRoot = useEditorStore((state) => state.helpersRoot)
if (process.env.NODE_ENV === 'development') {
const helpersRoot = useEditorStore((state) => state.helpersRoot)
return <>{createPortal(<Component {...props} />, helpersRoot)}</>
} else {
return null