multipool-ta-fe/components/ui/navbar.tsx

26 lines
664 B
TypeScript
Raw Normal View History

2026-04-15 23:38:26 +00:00
"use client"
import { useMemo } from "react"
import { NotificationIcon, UserFillIcon } from "../icons"
import { getCookiesDecrypt } from "@/utils/globals"
export default function Navbar(props: { title: string }) {
const { title } = props
const username: string | null = useMemo(() => {
return getCookiesDecrypt("username")
}, [])
return (
<div className="flex flex-col gap-1">
<div className="flex flex-row items-center justify-end gap-2">
<a>
<NotificationIcon />
</a>
<UserFillIcon size={36} />
<p>{username}</p>
</div>
<p className="text-2xl font-bold">{title}</p>
</div>
)
}