Skip to content

Commit

Permalink
Fix docs link
Browse files Browse the repository at this point in the history
  • Loading branch information
vkruglikov committed Oct 27, 2023
1 parent 87fbcf8 commit 1e3beb1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/clever-shrimps-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@vkruglikov/react-telegram-web-app': patch
---

Update docs
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# react-telegram-web-app

React components for Telegram Mini Apps
# React components for Telegram MiniApp

[![npm](https://img.shields.io/npm/v/@vkruglikov/react-telegram-web-app.svg)](https://www.npmjs.com/package/@vkruglikov/react-telegram-web-app)
[![types](https://badgen.net/npm/types/@vkruglikov/react-telegram-web-app)](https://npmjs.org/package/@vkruglikov/react-telegram-web-app)
Expand All @@ -16,7 +14,7 @@ Also, you can look demo [source code](./demo/src).

## 🔧 Installation & Get started

1️⃣  **Foremost**, you have to do [initializing web apps](https://core.telegram.org/bots/webapps#initializing-web-apps) step, because package has dependency of Telegram Web App context.
1️⃣  **Foremost**, you have to do [initializing web apps](https://core.telegram.org/bots/webapps#initializing-mini-apps) step, because package has dependency of Telegram Web App context.

2️⃣  **Install** by running: `npm i @vkruglikov/react-telegram-web-app --save`. Today we support React^18.

Expand Down
12 changes: 6 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ by the params argument of the type [ScanQrPopupParams](interfaces/ScanQrPopupPar
▸ (`query`, `chatType?`): `void`

This function that inserts the bot's username and the specified inline query in the current chat's input field
You have to look original description switchInlineQuery in [telegram!WebApp](https://core.telegram.org/bots/webapps#initializing-web-apps) for more information
You have to look original description switchInlineQuery in [telegram!WebApp](https://core.telegram.org/bots/webapps#initializing-mini-apps) for more information

##### Parameters

Expand Down Expand Up @@ -527,7 +527,7 @@ You have to look original description CloudStorage object in [telegram!CloudStor
**useExpand**(): readonly [`undefined` \| `boolean`, `DispatchWithoutAction`]

This hook provided isExpanded state, and expand() handle
You have to look original description in [telegram!WebApp](https://core.telegram.org/bots/webapps#initializing-web-apps) for more information
You have to look original description in [telegram!WebApp](https://core.telegram.org/bots/webapps#initializing-mini-apps) for more information

`isExpanded` can be `undefined`

Expand Down Expand Up @@ -577,7 +577,7 @@ readonly [[`ImpactOccurredFunction`](README.md#impactoccurredfunction), [`Notifi
**useInitData**(): readonly [[`InitDataUnsafe`](README.md#initdataunsafe), `string`]

This hook provides `initDataUnsafe` and `initData`
You have to look original description in [telegram!WebApp](https://core.telegram.org/bots/webapps#initializing-web-apps), because hook just return this.
You have to look original description in [telegram!WebApp](https://core.telegram.org/bots/webapps#initializing-mini-apps), because hook just return this.

```tsx
import { useInitData } from '@vkruglikov/react-telegram-web-app';
Expand All @@ -597,7 +597,7 @@ readonly [[`InitDataUnsafe`](README.md#initdataunsafe), `string`]
**useReadTextFromClipboard**(): [`ReadTextFromClipboardFunction`](README.md#readtextfromclipboardfunction)

This hook that provided [ReadTextFromClipboardFunction](README.md#readtextfromclipboardfunction) Promise function that read text from clipboard.
You have to look original description readTextFromClipboard in [telegram!WebApp](https://core.telegram.org/bots/webapps#initializing-web-apps), because hook just implements his.
You have to look original description readTextFromClipboard in [telegram!WebApp](https://core.telegram.org/bots/webapps#initializing-mini-apps), because hook just implements his.

```tsx
import { useReadTextFromClipboard } from '@vkruglikov/react-telegram-web-app';
Expand Down Expand Up @@ -653,7 +653,7 @@ showPopup({ message: 'Hello world' }).then(buttonId => console.log(buttonId));
**useSwitchInlineQuery**(): [`SwitchInlineQueryFunction`](README.md#switchinlinequeryfunction)

This hook that provided [SwitchInlineQueryFunction](README.md#switchinlinequeryfunction)
You have to look original description switchInlineQuery in [telegram!WebApp](https://core.telegram.org/bots/webapps#initializing-web-apps), because hook just implements his.
You have to look original description switchInlineQuery in [telegram!WebApp](https://core.telegram.org/bots/webapps#initializing-mini-apps), because hook just implements his.

#### Returns

Expand Down Expand Up @@ -690,7 +690,7 @@ readonly [[`ColorScheme`](README.md#colorscheme), [`ThemeParams`](interfaces/The

**useWebApp**(): `any`

This hook just provides native [telegram!WebApp](https://core.telegram.org/bots/webapps#initializing-web-apps) object
This hook just provides native [telegram!WebApp](https://core.telegram.org/bots/webapps#initializing-mini-apps) object

```tsx
import { useWebApp } from '@vkruglikov/react-telegram-web-app';
Expand Down
2 changes: 1 addition & 1 deletion typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"PopupButton": "https://core.telegram.org/bots/webapps#popupbutton",
"HapticFeedback": "https://core.telegram.org/bots/webapps#hapticfeedback",
"ThemeParams": "https://core.telegram.org/bots/webapps#themeparams",
"WebApp": "https://core.telegram.org/bots/webapps#initializing-web-apps",
"WebApp": "https://core.telegram.org/bots/webapps#initializing-mini-apps",
"WebAppInitData": "https://core.telegram.org/bots/webapps#webappinitdata",
"WebAppUser": "https://core.telegram.org/bots/webapps#webappuser",
"WebAppChat": "https://core.telegram.org/bots/webapps#webappchat"
Expand Down

0 comments on commit 1e3beb1

Please sign in to comment.