20 lines
382 B
TypeScript
20 lines
382 B
TypeScript
import { auth, signOut } from '@/config/auth'
|
|
|
|
const CabinetPage = async () => {
|
|
const session = await auth()
|
|
|
|
return (
|
|
<div>
|
|
{JSON.stringify(session)}
|
|
<form action={async () => {
|
|
'use server'
|
|
await signOut()
|
|
}}>
|
|
<button type="submit">SignOut {session?.user.role}</button>
|
|
</form>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default CabinetPage
|