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'
33
44const 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
4424export default AdsContainerElement
You can’t perform that action at this time.
0 commit comments