import { useLocalize } from '../../../context/localize' import { useSession } from '../../../context/session' import { Icon } from '../../_shared/Icon' import styles from './SocialProviders.module.scss' type Provider = 'facebook' | 'google' | 'github' // 'vk' | 'telegram' export const SocialProviders = () => { const { t } = useLocalize() const { actions: { oauthLogin }, } = useSession() const handleClick = async (event: MouseEvent | TouchEvent, provider: Provider): Promise => { event.preventDefault() await oauthLogin(provider) } return (
{t('or sign in with social networks')}
handleClick(ev, 'google')}> handleClick(ev, 'facebook')}> handleClick(ev, 'github')}>
) }