Skip to content

Commit 2161e45

Browse files
authored
feat: revert adsense code
1 parent 3ebd9d4 commit 2161e45

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

components/Advertisement.tsx

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,31 @@
11
import AdSense from 'react-adsense'
22

33
const Advertisement: React.FC<AdvertisementProps> = ({ size = 'short' }) => {
4-
return null
4+
return (
5+
<div className='py-5'>
6+
<div
7+
className={`z-0 mx-auto w-full text-center text-white ${
8+
process.env.NODE_ENV === 'production' ? '' : 'bg-gray-700 py-12'
9+
}`}
10+
style={size === 'short' ? { height: '90px' } : { height: '330px' }}
11+
>
12+
{process.env.NODE_ENV === 'production' ? (
13+
<AdSense.Google
14+
style={{
15+
display: 'inline-block',
16+
width: '100%',
17+
height: size === 'short' ? '90px' : '330px',
18+
}}
19+
client='ca-pub-2090578791829639'
20+
slot='3250141451'
21+
format=''
22+
/>
23+
) : (
24+
'Advertisement'
25+
)}
26+
</div>
27+
</div>
28+
)
529
}
630

731
declare global {

0 commit comments

Comments
 (0)