Browse Source

remove ads from editor

AykutSarac 2 years ago
parent
commit
5bc90f75c7
2 changed files with 5 additions and 4 deletions
  1. 5 3
      src/components/CarbonAds/index.tsx
  2. 0 1
      src/containers/Editor/JsonEditor/index.tsx

+ 5 - 3
src/components/CarbonAds/index.tsx

@@ -62,9 +62,11 @@ export const CarbonAds: React.FC<{ editor?: boolean }> = ({
 
   return (
     <StyledWrapper editor={editor} id="carbon-wrapper">
-      <StyledCloseBtn onClick={() => setIsHidden(true)}>
-        <IoMdClose color="white" size="15" />
-      </StyledCloseBtn>
+      {editor && (
+        <StyledCloseBtn onClick={() => setIsHidden(true)}>
+          <IoMdClose color="white" size="15" />
+        </StyledCloseBtn>
+      )}
       <Script
         type="text/javascript"
         src="https://cdn.carbonads.com/carbon.js?serve=CE7IPKQL&placement=jsonvisiocom"

+ 0 - 1
src/containers/Editor/JsonEditor/index.tsx

@@ -88,7 +88,6 @@ export const JsonEditor: React.FC = () => {
           loading={<Loading message="Loading Editor..." />}
           onChange={(value) => setValue(value as string)}
         />
-        <CarbonAds editor />
       </StyledWrapper>
     </StyledEditorWrapper>
   );