Pārlūkot izejas kodu

fix ads not showing

AykutSarac 3 gadi atpakaļ
vecāks
revīzija
df97b4950b

+ 5 - 1
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();

+ 1 - 5
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 (

+ 3 - 1
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 = () => {
     </StyledLiveEditor>
   );
 };
+
+export default LiveEditor;