diff --git a/src/containers/Editor/Panes.tsx b/src/containers/Editor/Panes.tsx index f4187b1..7063e13 100644 --- a/src/containers/Editor/Panes.tsx +++ b/src/containers/Editor/Panes.tsx @@ -1,9 +1,13 @@ import { Allotment } from "allotment"; import React from "react"; import { useConfig } from "src/hocs/config"; -import { LiveEditor } from "src/containers/LiveEditor"; import { JsonEditor } from "src/containers/JsonEditor"; import { StyledEditor } from "./styles"; +import dynamic from "next/dynamic"; + +const LiveEditor = dynamic(() => import("src/containers/LiveEditor"), { + ssr: false, +}); const Panes: React.FC = () => { const { settings } = useConfig(); diff --git a/src/containers/Editor/index.tsx b/src/containers/Editor/index.tsx index c4fc53e..61dc2f6 100644 --- a/src/containers/Editor/index.tsx +++ b/src/containers/Editor/index.tsx @@ -2,11 +2,7 @@ import React from "react"; import { Sidebar } from "src/components/Sidebar"; import { Incompatible } from "src/containers/Incompatible"; import * as Styles from "src/containers/Editor/styles"; -import dynamic from "next/dynamic"; - -const Panes = dynamic(() => import("./Panes"), { - ssr: false, -}); +import Panes from "./Panes"; const Editor: React.FC = () => { return ( diff --git a/src/containers/LiveEditor/index.tsx b/src/containers/LiveEditor/index.tsx index 54a4f25..3e5c3cd 100644 --- a/src/containers/LiveEditor/index.tsx +++ b/src/containers/LiveEditor/index.tsx @@ -33,7 +33,7 @@ const wheelOptions = { step: 0.05, }; -export const LiveEditor: React.FC = () => { +const LiveEditor: React.FC = () => { const { dispatch } = useConfig(); const onInit = (ref: ReactZoomPanPinchRef) => { @@ -68,3 +68,5 @@ export const LiveEditor: React.FC = () => { ); }; + +export default LiveEditor;