File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,11 @@ import Footer from '@theme-original/Footer'
4
4
// import AdsContainerElement from '@site/src/components/AdsContainerElement'
5
5
6
6
export default function FooterWrapper ( props ) {
7
+ let shadoWindow = null
8
+
7
9
useEffect ( ( ) => {
8
10
if ( typeof window !== 'undefined' ) {
11
+ shadoWindow = window
9
12
const scriptElement = document . createElement ( 'script' )
10
13
scriptElement . src =
11
14
'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7420210265158247'
@@ -23,7 +26,7 @@ export default function FooterWrapper(props) {
23
26
24
27
return (
25
28
< >
26
- { window && window . document . body . clientWidth <= 768 && (
29
+ { shadoWindow && shadoWindow . document . body . clientWidth <= 768 && (
27
30
< ins
28
31
className = "adsbygoogle"
29
32
style = { {
You can’t perform that action at this time.
0 commit comments