webapp/src/components/Nav/AuthModal/SocialProviders.tsx
Untone 333d7c5961
Some checks failed
deploy / test (push) Failing after 59s
deploy / Update templates on Mailgun (push) Has been skipped
no-actions-context-value
2024-02-04 20:40:15 +03:00

30 lines
833 B
TypeScript

import { For } from 'solid-js'
import { useLocalize } from '../../../context/localize'
import { useSession } from '../../../context/session'
import { Icon } from '../../_shared/Icon'
import styles from './SocialProviders.module.scss'
export const PROVIDERS = ['facebook', 'google', 'github'] // 'vk' | 'telegram'
export const SocialProviders = () => {
const { t } = useLocalize()
const { oauth } = useSession()
return (
<div class={styles.container}>
<div class={styles.text}>{t('or sign in with social networks')}</div>
<div class={styles.social}>
<For each={PROVIDERS}>
{(provider) => (
<button class={styles[provider]} onClick={(_e) => oauth(provider)}>
<Icon name={provider} />
</button>
)}
</For>
</div>
</div>
)
}