File tree Expand file tree Collapse file tree 1 file changed +1
-21
lines changed
docs/src/components/AdsContainerElement Expand file tree Collapse file tree 1 file changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import './styles.css'
3
3
4
4
const AdsContainerElement = ( ) => {
5
5
const containerRef = useRef < any > ( )
6
- const containerRef2 = useRef < any > ( )
7
6
8
7
useEffect ( ( ) => {
9
8
if ( typeof window !== 'undefined' ) {
@@ -19,26 +18,7 @@ const AdsContainerElement = () => {
19
18
}
20
19
} , [ ] )
21
20
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 } />
42
22
}
43
23
44
24
export default AdsContainerElement
You can’t perform that action at this time.
0 commit comments