fix: ad stuff

This commit is contained in:
원더 2021-02-04 20:40:32 +09:00
parent 122a4acec1
commit d4f585d89d

View File

@ -1,5 +1,8 @@
import { useEffect } from 'react'
const Advertisement = (): JSX.Element => { const Advertisement = (): JSX.Element => {
return <div className='my-5 mx-auto py-12 w-full text-center text-white bg-gray-700'> useEffect(() => window.adsbygoogle.push({}), [])
return <div className={`my-1 mx-auto py-12 w-full text-center text-white ${process.env.NODE_ENV === 'production' ? '' : 'bg-gray-700'}`}>
{ {
process.env.NODE_ENV === 'production' ? <ins process.env.NODE_ENV === 'production' ? <ins
className='adsbygoogle mb-5 w-full' className='adsbygoogle mb-5 w-full'
@ -13,4 +16,11 @@ const Advertisement = (): JSX.Element => {
}</div> }</div>
} }
declare global {
interface Window { adsbygoogle: {
loaded: boolean
push(obj: unknown): void
} }
}
export default Advertisement export default Advertisement