This commit is contained in:
@@ -1,7 +1,15 @@
|
||||
import React from "react"
|
||||
import { Link } from 'react-router-dom'
|
||||
|
||||
const TopNav: React.FC = () => (
|
||||
type User = { id: number
|
||||
name: string | null
|
||||
inheritanceCode: string
|
||||
role: string }
|
||||
|
||||
type Props = { user: User }
|
||||
|
||||
|
||||
const TopNav: React.FC = ({ user }: Props) => (
|
||||
<nav className="bg-gray-800 text-white p-3 flex justify-between items-center w-full">
|
||||
<div className="flex items-center gap-4">
|
||||
<Link to="/" className="text-xl font-bold text-orange-500">ぼざクリ タグ広場</Link>
|
||||
@@ -11,8 +19,9 @@ const TopNav: React.FC = () => (
|
||||
<Link to="/wiki" className="hover:text-orange-500">Wiki</Link>
|
||||
</div>
|
||||
<div className="ml-auto pr-4">
|
||||
<Link to="/login" className="hover:text-orange-500">ログイン</Link>
|
||||
<Link to="/setting" className="hover:text-orange-500">{user?.name || '名もなきニジラー'}</Link>
|
||||
</div>
|
||||
</nav>)
|
||||
|
||||
|
||||
export default TopNav
|
||||
|
||||
Reference in New Issue
Block a user