Skip to content

Commit cc91763

Browse files
committed
ads: remove second ads container that was in testing
1 parent 551cfe4 commit cc91763

File tree

1 file changed

+1
-21
lines changed
  • docs/src/components/AdsContainerElement

1 file changed

+1
-21
lines changed

docs/src/components/AdsContainerElement/index.tsx

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import './styles.css'
33

44
const AdsContainerElement = () => {
55
const containerRef = useRef<any>()
6-
const containerRef2 = useRef<any>()
76

87
useEffect(() => {
98
if (typeof window !== 'undefined') {
@@ -19,26 +18,7 @@ const AdsContainerElement = () => {
1918
}
2019
}, [])
2120

22-
useEffect(() => {
23-
if (typeof window !== 'undefined' && window?.document?.body?.clientHeight >= 950) {
24-
const scriptElement = document.createElement('script')
25-
scriptElement.src = '//cdn.carbonads.com/carbon.js?serve=CWYD553L&placement=react-tooltipcom'
26-
scriptElement.id = '_carbonads_js'
27-
scriptElement.async = true
28-
29-
if (containerRef2?.current) {
30-
containerRef2.current.innerHTML = ''
31-
containerRef2.current.appendChild(scriptElement)
32-
}
33-
}
34-
}, [])
35-
36-
return (
37-
<>
38-
<div className="carbon-ads" ref={containerRef} />
39-
<div className="carbon-ads" ref={containerRef2} />
40-
</>
41-
)
21+
return <div className="carbon-ads" ref={containerRef} />
4222
}
4323

4424
export default AdsContainerElement

0 commit comments

Comments
 (0)