7 lines
151 B
TypeScript
7 lines
151 B
TypeScript
import { useSession } from 'next-auth/react'
|
|
|
|
export const useCurrentRole = () => {
|
|
const session = useSession()
|
|
|
|
return session.data?.user?.role
|
|
} |