This commit is contained in:
parent
e8ca735741
commit
106e4c26a8
@ -1,19 +1,22 @@
|
|||||||
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { classNames } from "../util/lang"
|
import { classNames } from "../util/lang"
|
||||||
|
import { useEffect } from "react"
|
||||||
|
|
||||||
const Ads: QuartzComponent = ({ displayClass, fileData }: QuartzComponentProps) => {
|
const Ads: QuartzComponent = ({ displayClass, fileData }: QuartzComponentProps) => {
|
||||||
return (
|
useEffect(() => {
|
||||||
<!-- Yandex.RTB R-A-12784625-1 -->
|
|
||||||
<div id="yandex_rtb_R-A-12784625-1"></div>
|
|
||||||
<script>
|
|
||||||
window.yaContextCb.push(() => {
|
window.yaContextCb.push(() => {
|
||||||
Ya.Context.AdvManager.render({
|
Ya.Context.AdvManager.render({
|
||||||
"blockId": "R-A-12784625-1",
|
blockId: "R-A-12784625-1",
|
||||||
"renderTo": "yandex_rtb_R-A-12784625-1"
|
renderTo: "yandex_rtb_R-A-12784625-1"
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
</script>
|
}, [])
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div id="yandex_rtb_R-A-12784625-1">
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default (() => Ads) satisfies QuartzComponentConstructor
|
export default (() => Ads) satisfies QuartzComponentConstructor
|
||||||
|
Loading…
Reference in New Issue
Block a user