feat: revert adsense code

This commit is contained in:
Eunwoo Choi 2025-01-20 11:30:04 +09:00 committed by GitHub
parent 3ebd9d4c4f
commit 2161e45ee3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,7 +1,31 @@
import AdSense from 'react-adsense'
const Advertisement: React.FC<AdvertisementProps> = ({ size = 'short' }) => {
return null
return (
<div className='py-5'>
<div
className={`z-0 mx-auto w-full text-center text-white ${
process.env.NODE_ENV === 'production' ? '' : 'bg-gray-700 py-12'
}`}
style={size === 'short' ? { height: '90px' } : { height: '330px' }}
>
{process.env.NODE_ENV === 'production' ? (
<AdSense.Google
style={{
display: 'inline-block',
width: '100%',
height: size === 'short' ? '90px' : '330px',
}}
client='ca-pub-2090578791829639'
slot='3250141451'
format=''
/>
) : (
'Advertisement'
)}
</div>
</div>
)
}
declare global {