mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
replace breadcrumb with navigation
This commit is contained in:
17
components/user.tsx
Normal file
17
components/user.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import { useContext } from 'react'
|
||||
|
||||
import UserContext from './user/context'
|
||||
|
||||
export default function User() {
|
||||
const { username, role } = useContext(UserContext)
|
||||
|
||||
if (!username || !role) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="font-extrabold bg-red-400 px-2 py-1 mr-3 rounded-sm">
|
||||
{username}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user