Skip to content

Commit 0d596f2

Browse files
committed
feat: Update AuthModal to include Google and GitHub auth providers with dynamic links
1 parent 8972fc3 commit 0d596f2

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/features/auth/components/AuthModal.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
//import { AuthProvider, signInWithPopup } from 'firebase/auth'
2-
import { AuthProvider } from 'firebase/auth'
1+
import { AuthProvider, GithubAuthProvider, GoogleAuthProvider } from 'firebase/auth'
32
import { useCallback, useState } from 'react'
43
import { FaGithub } from 'react-icons/fa'
54
import { FcGoogle } from 'react-icons/fc'
65
import { IoHeartCircle } from 'react-icons/io5'
76
import { Button, Modal } from 'src/components/Elements'
8-
import { BUILD_TARGET } from 'src/config'
7+
import { BUILD_TARGET, privacyPolicyLink, termsAndConditionsLink } from 'src/config'
98
import { useAuth } from 'src/features/auth'
10-
import { githubAuthProvider, googleAuthProvider } from 'src/lib/firebase'
119
import { getBrowserName } from 'src/utils/Environment'
1210
import { checkHostPermissions, requestHostPermissions } from 'src/utils/Permissions'
1311
import { useGetOauthLink } from '../api/getOauthLink'
@@ -17,6 +15,9 @@ type AuthModalProps = {
1715
showAuth: boolean
1816
}
1917

18+
const googleAuthProvider = new GoogleAuthProvider()
19+
const githubAuthProvider = new GithubAuthProvider()
20+
2021
export const AuthModal = ({ showAuth }: AuthModalProps) => {
2122
const { closeAuthModal, authError, setAuthError } = useAuth()
2223
const [selectedProvider, setSelectedProvider] = useState<AuthProvider>(googleAuthProvider)
@@ -113,11 +114,11 @@ export const AuthModal = ({ showAuth }: AuthModalProps) => {
113114
<div className="footer">
114115
<p>
115116
By signing in, you agree to our{' '}
116-
<a href="https://hackertab.dev/terms-and-conditions" target="_blank" rel="noreferrer">
117+
<a href={termsAndConditionsLink} target="_blank" rel="noreferrer">
117118
Terms of Service
118119
</a>{' '}
119120
and{' '}
120-
<a href="https://hackertab.dev/privacy-policy" target="_blank" rel="noreferrer">
121+
<a href={privacyPolicyLink} target="_blank" rel="noreferrer">
121122
Privacy Policy
122123
</a>
123124
.

0 commit comments

Comments
 (0)