tldraw/apps/www/hooks/useAccountHandlers.ts

15 lines
295 B
TypeScript
Raw Normal View History

import * as React from 'react'
import { signIn, signOut } from 'next-auth/client'
export function useAccountHandlers() {
const onSignIn = React.useCallback(() => {
signIn()
}, [])
const onSignOut = React.useCallback(() => {
signOut()
}, [])
return { onSignIn, onSignOut }
}