Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

Commit

Permalink
@tma.js -> @telegram-apps
Browse files Browse the repository at this point in the history
  • Loading branch information
heyqbnk committed Jul 6, 2024
1 parent aaab6f3 commit 37e6363
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 57 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Mini Apps platform using the following technologies and libraries:
- [React](https://react.dev/)
- [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
- [TON Connect](https://docs.ton.org/develop/dapps/ton-connect/overview)
- [@tma.js SDK](https://docs.telegram-mini-apps.com/packages/tma-js-sdk)
- [@telegram-apps SDK](https://docs.telegram-mini-apps.com/packages/telegram-apps-sdk)
- [Telegram UI](https://github.com/Telegram-Mini-Apps/TelegramUI)
- [Vite](https://vitejs.dev/)

Expand Down Expand Up @@ -71,7 +71,7 @@ link (`http://localhost:5173/reactjs-js-template` in this example) in your brows

![Application](assets/application.png)

It is important to note that some libraries in this template, such as `@tma.js/sdk`, are not
It is important to note that some libraries in this template, such as `@telegram-apps/sdk`, are not
intended for use outside of Telegram.

Nevertheless, they appear to function properly. This is because the `src/mockEnv.js` file, which is
Expand Down Expand Up @@ -243,5 +243,5 @@ project's information.
## Useful Links

- [Platform documentation](https://docs.telegram-mini-apps.com/)
- [@tma.js/sdk-react documentation](https://docs.telegram-mini-apps.com/packages/tma-js-sdk-react)
- [@telegram-apps/sdk-react documentation](https://docs.telegram-mini-apps.com/packages/telegram-apps-sdk-react)
- [Telegram developers community chat](https://t.me/devs)
73 changes: 35 additions & 38 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"predeploy": "npm run build"
},
"dependencies": {
"@telegram-apps/react-router-integration": "^1.0.0",
"@telegram-apps/sdk-react": "^1.0.0",
"@telegram-apps/telegram-ui": "^2.1.4",
"@tma.js/react-router-integration": "^4.0.3",
"@tma.js/sdk-react": "^2.2.5",
"@tonconnect/ui-react": "^2.0.5",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
Expand Down
4 changes: 2 additions & 2 deletions src/components/App.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useIntegration } from '@tma.js/react-router-integration';
import { useIntegration } from '@telegram-apps/react-router-integration';
import {
bindMiniAppCSSVars,
bindThemeParamsCSSVars,
Expand All @@ -7,7 +7,7 @@ import {
useMiniApp,
useThemeParams,
useViewport,
} from '@tma.js/sdk-react';
} from '@telegram-apps/sdk-react';
import { AppRoot } from '@telegram-apps/telegram-ui';
import { useEffect, useMemo } from 'react';
import {
Expand Down
4 changes: 2 additions & 2 deletions src/components/DisplayData/DisplayData.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isRGB } from '@tma.js/sdk-react';
import { isRGB } from '@telegram-apps/sdk-react';
import { Cell, Checkbox, Section } from '@telegram-apps/telegram-ui';

import { RGB } from '@/components/RGB/RGB.jsx';
Expand All @@ -9,7 +9,7 @@ import './DisplayData.css';
/**
* @typedef {object} DisplayDataRow
* @property {string} title
* @property {string | boolean | import('react').ReactNode | import('@tma.js/sdk-react').RGB} [value]
* @property {string | boolean | import('react').ReactNode | import('@telegram-apps/sdk-react').RGB} [value]
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/components/Link/Link.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { classNames, useUtils } from '@tma.js/sdk-react';
import { classNames, useUtils } from '@telegram-apps/sdk-react';
import { useCallback } from 'react';
import { Link as RouterLink } from 'react-router-dom';

Expand Down
4 changes: 2 additions & 2 deletions src/components/RGB/RGB.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { classNames } from '@tma.js/sdk-react';
import { classNames } from '@telegram-apps/sdk-react';

import './RGB.css';

/**
* @param {import('@tma.js/sdk-react').RGB} color
* @param {import('@telegram-apps/sdk-react').RGB} color
* @param {string} [className]
* @param rest
* @return {JSX.Element}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Root.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SDKProvider, useLaunchParams } from '@tma.js/sdk-react';
import { SDKProvider, useLaunchParams } from '@telegram-apps/sdk-react';
import { TonConnectUIProvider } from '@tonconnect/ui-react';
import { useEffect, useMemo } from 'react';

Expand Down
2 changes: 1 addition & 1 deletion src/mockEnv.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mockTelegramEnv, parseInitData, retrieveLaunchParams } from '@tma.js/sdk-react';
import { mockTelegramEnv, parseInitData, retrieveLaunchParams } from '@telegram-apps/sdk-react';

// It is important, to mock the environment only for development purposes. When building the
// application, import.meta.env.DEV will become false, and the code inside will be tree-shaken,
Expand Down
4 changes: 2 additions & 2 deletions src/pages/InitDataPage/InitDataPage.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { useMemo } from 'react';
import { useInitData, useLaunchParams } from '@tma.js/sdk-react';
import { useInitData, useLaunchParams } from '@telegram-apps/sdk-react';
import { List, Placeholder } from '@telegram-apps/telegram-ui';

import { DisplayData } from '@/components/DisplayData/DisplayData.jsx';

import './InitDataPage.css';

/**
* @param {import('@tma.js/sdk-react').User} user
* @param {import('@telegram-apps/sdk-react').User} user
* @returns {DisplayDataRow[]}
*/
function getUserRows(user) {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/LaunchParamsPage/LaunchParamsPage.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useLaunchParams } from '@tma.js/sdk-react';
import { useLaunchParams } from '@telegram-apps/sdk-react';
import { List } from '@telegram-apps/telegram-ui';

import { DisplayData } from '@/components/DisplayData/DisplayData.jsx';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/TONConnectPage/TONConnectPage.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useUtils } from '@tma.js/sdk-react';
import { useUtils } from '@telegram-apps/sdk-react';
import { TonConnectButton, useTonWallet } from '@tonconnect/ui-react';
import {
Avatar,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ThemeParamsPage/ThemeParamsPage.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useThemeParams } from '@tma.js/sdk-react';
import { useThemeParams } from '@telegram-apps/sdk-react';
import { List } from '@telegram-apps/telegram-ui';

import { DisplayData } from '@/components/DisplayData/DisplayData.jsx';
Expand Down

0 comments on commit 37e6363

Please sign in to comment.