File tree Expand file tree Collapse file tree
settings/components/GeneralSettings Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { AuthModalStore , AuthStore } from 'src/features/auth'
22import { trackUserDisconnect } from 'src/lib/analytics'
3+ import { firebaseAuth } from 'src/lib/firebase'
34
45export const useAuth = ( ) => {
56 const { isAuthModalOpen, openAuthModal, closeAuthModal } = AuthModalStore ( )
@@ -8,9 +9,10 @@ export const useAuth = () => {
89
910 const isConnected = ( ) => user != null
1011
11- const logout = ( ) => {
12+ const logout = async ( ) => {
1213 trackUserDisconnect ( )
1314 clear ( )
15+ return await firebaseAuth . signOut ( )
1416 }
1517
1618 return {
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import { Option } from 'src/types'
2222import { DNDSettings } from './DNDSettings'
2323import './generalSettings.css'
2424
25+ // TODO Maybe we should create a separate folder in components for UserInfo ?
2526interface UserInfoProps {
2627 user : User
2728}
You can’t perform that action at this time.
0 commit comments