@@ -2,19 +2,38 @@ import { useState } from 'react'
22import { FaGithub } from 'react-icons/fa'
33import { FcGoogle } from 'react-icons/fc'
44import { IoCheckmarkOutline } from 'react-icons/io5'
5+ import { ReactComponent as AvatarPlaceholder } from 'src/assets/icons/avatar.svg'
56import { ReactComponent as StreakIcon } from 'src/assets/icons/fire_icon.svg'
67import { Button , ConfirmModal } from 'src/components/Elements'
78import { useAuth } from 'src/features/auth'
89import { pluralize } from 'src/utils/String'
910
1011export const UserInfo = ( ) => {
1112 const { user } = useAuth ( )
12- const { logout, providerId } = useAuth ( )
13+ const { logout, providerId, openAuthModal } = useAuth ( )
1314 const providerName = providerId ?. split ( '.' ) [ 0 ] || 'Unknown'
1415 const [ showLogout , setShowLogout ] = useState ( false )
1516
1617 if ( ! user ) {
17- return null
18+ return (
19+ < div className = "userContent" >
20+ < AvatarPlaceholder className = "userImage" />
21+ < div className = "userInfos" >
22+ < div className = "userName" >
23+ Join < b > Hackertab</ b >
24+ </ div >
25+ < div className = "sub" >
26+ Create a free account on < b > Hackertab</ b > to sync, save bookmarks, and earn rewards.
27+ settings.
28+ </ div >
29+ < div className = "actions" >
30+ < Button className = "logoutBtn" onClick = { ( ) => openAuthModal ( ) } size = "small" >
31+ Connect
32+ </ Button >
33+ </ div >
34+ </ div >
35+ </ div >
36+ )
1837 }
1938
2039 return (
@@ -37,7 +56,7 @@ export const UserInfo = () => {
3756 ) : null }
3857 Connected with < span className = "capitalize" > { providerName } </ span >
3958 </ div >
40- < div >
59+ < div className = "actions" >
4160 < Button className = "logoutBtn" onClick = { ( ) => setShowLogout ( true ) } size = "small" >
4261 Logout
4362 </ Button >
0 commit comments