Skip to content

Commit

Permalink
fixes from review
Browse files Browse the repository at this point in the history
  • Loading branch information
isazaharadeen committed Jan 27, 2025
1 parent 824a72f commit 683b3ba
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
1 change: 1 addition & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<script src="https://telegram.org/js/telegram-widget.js?22"></script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!-- Bootstrap JS (Optional) -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
Expand Down
5 changes: 0 additions & 5 deletions frontend/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,15 @@ import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import App from './App';


const queryClient = new QueryClient();

const root = ReactDOM.createRoot(document.getElementById('root'));

const Ca = () => <p>hello</p>;

root.render(
<QueryClientProvider client={queryClient}>

<Router>
<App />
</Router>
<ReactQueryDevtools initialIsOpen={false} />

</QueryClientProvider>
);
16 changes: 2 additions & 14 deletions web_app/telegram/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Telegram Bot Setup

This document provides instructions on how to set up and run the Telegram bot, as well as how to configure webhooks.

## Prerequisites
Expand All @@ -9,14 +7,11 @@ This document provides instructions on how to set up and run the Telegram bot, a
## Setting Up the Environment

2. **Create a `.env` file in the root directory and add your environment variables:**

```env
TELEGRAM_TOKEN=<your-telegram-bot-token>
TELEGRAM_WEBAPP_URL=<your-webapp-url>
APP_BOT_ID=<your-telegram-bot-id>
REACT_APP_BOT_ID=<your-telegram-bot-id>
```

Note: You can obtain the bot ID directly from your Telegram bot token in the format `bot_id:secret`.

## Running the Bot
Expand All @@ -40,14 +35,7 @@ To set the webhook for your Telegram bot, follow these steps:
This will set the webhook URL to the current request URL.

3. Ensure that your server is publicly accessible so that Telegram can send updates to your webhook.

## Additional Configuration In [BotFather](https://core.telegram.org/bots#botfather)

- **Domain:** You need to set a domain for the bot to work properly with the Telegram widget login(frontend).
- **Photo** You need to upload your site's logo, as it will be displayed when users log in through the Telegram login widget![alt text](./assets/image.png)
- **Configure MiniApp URL:** This is optional but recommended for better integration.

## Notes
@@ -48,4 +52,4 @@ To set the webhook for your Telegram bot, follow these steps:

- Make sure your server is running and accessible to Telegram for the webhook to function correctly.
- You can test the bot by sending the `/start` command after setting up the webhook.
Expand Down

0 comments on commit 683b3ba

Please sign in to comment.