add client/admin pages, show info and created admin api and server actions
This commit is contained in:
7
hooks/useCurrentRole.ts
Normal file
7
hooks/useCurrentRole.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { useSession } from 'next-auth/react'
|
||||
|
||||
export const useCurrentRole = () => {
|
||||
const session = useSession()
|
||||
|
||||
return session.data?.user?.role
|
||||
}
|
||||
Reference in New Issue
Block a user