mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 14:30:22 +00:00
feat: added size prop
This commit is contained in:
parent
b73a60a310
commit
7fbc37cf1f
@ -1,12 +1,12 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
const Advertisement = (): JSX.Element => {
|
||||
const Advertisement = ({ size='short' }:AdvertisementProps): JSX.Element => {
|
||||
useEffect(() => {
|
||||
if(process.env.NODE_ENV === 'production')
|
||||
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={{ height: '90px' }}>
|
||||
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'}}>
|
||||
{
|
||||
process.env.NODE_ENV === 'production' ? <ins
|
||||
className='adsbygoogle mb-5 w-full'
|
||||
@ -26,4 +26,8 @@ declare global {
|
||||
} }
|
||||
}
|
||||
|
||||
interface AdvertisementProps {
|
||||
size?: 'short' | 'tall'
|
||||
}
|
||||
|
||||
export default Advertisement
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user