This commit is contained in:
2025-05-28 02:29:14 +09:00
parent 3535ef1c70
commit 03c2434236
4 changed files with 67 additions and 12 deletions
+11 -2
View File
@@ -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