mirror of
https://github.com/penxio/penx.git
synced 2026-04-19 03:03:06 -04:00
21 lines
555 B
TypeScript
21 lines
555 B
TypeScript
'use client'
|
|
|
|
import { LogOut } from 'lucide-react'
|
|
import { signOut } from 'next-auth/react'
|
|
import { useRouter } from 'next/navigation'
|
|
|
|
export default function LogoutButton() {
|
|
const { push } = useRouter()
|
|
return (
|
|
<button
|
|
onClick={() => {
|
|
signOut()
|
|
push('/login')
|
|
}}
|
|
className="rounded-lg p-1.5 text-stone-700 transition-all duration-150 ease-in-out hover:bg-stone-200 active:bg-stone-300 dark:text-white dark:hover:bg-stone-700 dark:active:bg-stone-800"
|
|
>
|
|
<LogOut width={18} />
|
|
</button>
|
|
)
|
|
}
|