Skip to content

Commit

Permalink
add tg widget
Browse files Browse the repository at this point in the history
  • Loading branch information
smthingwicked committed Aug 30, 2021
1 parent 77f8a98 commit 43cd715
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/client/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ function App() {
<div>
<Heading size={1} renderAs="p" className="has-text-centered-mobile is-size-2-mobile">HakeShonassyBot</Heading>
<Heading subtitle renderAs="p" className="has-text-centered-mobile is-size-5-mobile">Телеграм бот раздающий глупые ачивки участникам чата</Heading>
<script async src="https://telegram.org/js/telegram-widget.js?14" data-telegram-login="HakeShonassyBot" data-size="large" data-auth-url="https://github.com/qelphybox/hakeshonassybot/issues/180"></script>
</div>
</Columns.Column>
<Columns.Column>
Expand All @@ -36,7 +35,9 @@ function App() {
<Content style={{ textAlign: 'center' }}>
<p>
<strong>HakeShonassyBot</strong> Исходный код лицензирован <a href="http://opensource.org/licenses/mit-license.php">MIT</a>
<a href="https://github.com/qelphybox/hakeshonassybot"> Github</a>
<a href="https://t.me/kirillbobykin"> Связаться с нами </a>
<a href="https://github.com/qelphybox/hakeshonassybot"> Github </a>
<a href="https://t.me/HakeShonassyBot"> Telegram </a>
</p>
</Content>
</Container>
Expand Down
10 changes: 10 additions & 0 deletions src/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@ import App from './App';
document.addEventListener('DOMContentLoaded', () => {
const body = document.querySelector('body');
const container = document.createElement('div');
const script = document.createElement('script');

script.src = 'https://telegram.org/js/telegram-widget.js?15';
script.setAttribute('data-telegram-login', 'HakeTestAdv_bot');
script.setAttribute('data-size', 'large');
script.setAttribute('data-auth-url', 'https://4eea-93-92-200-193.ngrok.io');
script.async = true;

container.className = 'hakeshonassybot-container';
document.body.appendChild(script);
//body.append(container, script);
body.append(container);

ReactDOM.render(<App />, container);
Expand Down

0 comments on commit 43cd715

Please sign in to comment.