1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

telegram: added telegram attach functionality

This commit is contained in:
Fedor Katurov 2023-03-13 17:32:44 +06:00
parent 3e9f5dedec
commit e994176bff
10 changed files with 131 additions and 9 deletions

View file

@ -0,0 +1,13 @@
import { useCallback } from 'react';
import { TelegramUser } from '@v9v/ts-react-telegram-login';
import { apiAttachTelegram } from '../../api/auth/index';
export const useTelegramAccount = () => {
const attach = useCallback((data: TelegramUser) => {
apiAttachTelegram(data);
}, []);
return { attach };
};