#23 バグの修正およびリファクタリング等

This commit is contained in:
2025-07-23 03:28:40 +09:00
parent e907cb0a8f
commit a46d15467e
3 changed files with 54 additions and 41 deletions
+30
View File
@@ -0,0 +1,30 @@
import { Link } from 'react-router-dom'
import Separator from '@/components/MenuSeparator'
import { cn } from '@/lib/utils'
import type { User } from '@/types'
type Props = { user: User | null,
sp?: boolean }
export default ({ user, sp }: Props) => {
if (!(user))
return
const className = cn ((sp
? 'md:hidden w-full min-h-[40px] flex items-center pl-8'
: 'hidden md:block ml-auto pr-4'),
'font-bold text-red-600 hover:text-red-400',
'dark:text-yellow-400 dark:hover:text-yellow-200')
return (
<>
{sp && <Separator />}
<Link to="/users/settings"
className={className}>
{user.name || '名もなきニジラー'}
</Link>
</>)
}