B
B
bitwheeze2021-11-14 17:46:33
HTML
bitwheeze, 2021-11-14 17:46:33

How to embed telegram chat widget in react app?

Please advise on this matter.

Click this link to get the script code to insert into the html page. like this

<script async src="https://telegram.org/js/telegram-widget.js?15" data-telegram-discussion="444345" data-comments-limit="5" data-color="29B127" data-dark-color="72E350"></script>


I have a react/next.js app with bootstrap. View Page
<Container>
<Row>
   <Col>
        <MainApp />
   </Col>
   <Col>
        {/* Тут хочу вставить виджет чата */}
   </Col>
</Row>
</Container>


I tried to stupidly insert a script between , but I get an error<Col></Col>

Did not expect server HTML to contain a <iframe> in <div>.


Apparently the script is trying to add an iframe tag and the rect does not like it, or some block is worth it.

I feel like I'm doing something wrong, but I don't know how to do it right. There are no examples on the site.

Thanks

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question