yandex
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Struchkov Mark 2024-11-08 23:46:47 +03:00
parent e8ca735741
commit 106e4c26a8
No known key found for this signature in database
GPG Key ID: A3F0AC3F0FA52F3C

View File

@ -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