mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 14:30:22 +00:00
chore: change ad code
This commit is contained in:
parent
b8218c0db1
commit
f711a9dc4e
@ -2,8 +2,10 @@ import { useEffect } from 'react'
|
|||||||
|
|
||||||
const Advertisement = ({ size='short' }:AdvertisementProps): JSX.Element => {
|
const Advertisement = ({ size='short' }:AdvertisementProps): JSX.Element => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(process.env.NODE_ENV === 'production')
|
if(process.env.NODE_ENV === 'production') {
|
||||||
window?.adsbygoogle?.push({})
|
window.adsbygoogle = window.adsbygoogle || []
|
||||||
|
window.adsbygoogle.push({})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
return <div className={`z-0 mx-auto w-full text-center text-white ${process.env.NODE_ENV === 'production' ? '' : 'py-12 bg-gray-700'}`} style={size === 'short' ? { height: '90px' } : { height: '330px'}}>
|
return <div className={`z-0 mx-auto w-full text-center text-white ${process.env.NODE_ENV === 'production' ? '' : 'py-12 bg-gray-700'}`} style={size === 'short' ? { height: '90px' } : { height: '330px'}}>
|
||||||
@ -21,7 +23,7 @@ const Advertisement = ({ size='short' }:AdvertisementProps): JSX.Element => {
|
|||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window { adsbygoogle: {
|
interface Window { adsbygoogle: {
|
||||||
loaded: boolean
|
loaded?: boolean
|
||||||
push(obj: unknown): void
|
push(obj: unknown): void
|
||||||
} }
|
} }
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user