File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -70,11 +70,13 @@ export default function Post({ postData, relatedPosts }: InferGetStaticPropsType
7070 const hasMoreRelated = visibleRelatedCount < relatedPosts . length ;
7171
7272 useEffect ( ( ) => {
73- try {
74- ( window . adsbygoogle = window . adsbygoogle || [ ] ) . push ( { } ) ;
75- } catch ( e ) {
76- console . error ( "Adsbygoogle push error:" , e ) ;
77- }
73+ setTimeout ( ( ) => {
74+ try {
75+ ( window . adsbygoogle = window . adsbygoogle || [ ] ) . push ( { } ) ;
76+ } catch ( e ) {
77+ console . error ( "Adsbygoogle push error:" , e ) ;
78+ }
79+ } , 500 ) ;
7880 } , [ ] ) ;
7981
8082 useEffect ( ( ) => {
@@ -167,7 +169,7 @@ export default function Post({ postData, relatedPosts }: InferGetStaticPropsType
167169 </ div >
168170 ) }
169171 { /* ads */ }
170- < div className = "mt-10 flex justify-center" >
172+ < div className = "mt-10 flex justify-center min-h-[100px] " >
171173 < ins
172174 className = "adsbygoogle"
173175 style = { { display : "block" } }
You can’t perform that action at this time.
0 commit comments