update layu
This commit is contained in:
15
dashboard_js/app/routes/auth/logout.jsx
Normal file
15
dashboard_js/app/routes/auth/logout.jsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import { useNavigate } from 'react-router'
|
||||
import { useEffect } from 'react'
|
||||
import { useAuth } from '~/hooks/use-auth'
|
||||
|
||||
export default function Component() {
|
||||
const { signOut } = useAuth()
|
||||
const navigate = useNavigate()
|
||||
|
||||
useEffect(() => {
|
||||
signOut()
|
||||
navigate('/auth')
|
||||
}, [])
|
||||
|
||||
return <></>
|
||||
}
|
||||
Reference in New Issue
Block a user