浏览代码

fix ads script

AykutSarac 3 年之前
父节点
当前提交
2e83dcb27e
共有 1 个文件被更改,包括 7 次插入6 次删除
  1. 7 6
      src/components/CarbonAds/index.tsx

+ 7 - 6
src/components/CarbonAds/index.tsx

@@ -1,18 +1,19 @@
 import React from "react";
+import styled from "styled-components";
 
-const isDevelopment = process.env.NODE_ENV === "development";
+const StyledWrapper = styled.div`
+  width: 100%;
+  height: 100%;
+`;
 
 export const CarbonAds = () => {
-  if (isDevelopment) return null;
-  
   return (
-    <>
+    <StyledWrapper>
       <script
-        async
         type="text/javascript"
         src="//cdn.carbonads.com/carbon.js?serve=CE7IPKQL&placement=jsonvisiocom"
         id="_carbonads_js"
       ></script>
-    </>
+    </StyledWrapper>
   );
 };