mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-06 00:04:39 +00:00
refactor: navbar - make user profile consistent with links.
This commit is contained in:
parent
35c79559ab
commit
a3f5f2e116
1 changed files with 14 additions and 6 deletions
|
@ -34,7 +34,7 @@ export const Navbar = () => {
|
|||
title: "Закладки",
|
||||
href: "/bookmarks",
|
||||
withAuthOnly: true,
|
||||
mobileMenu: true,
|
||||
mobileMenu: false,
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
|
@ -66,7 +66,11 @@ export const Navbar = () => {
|
|||
key={link.id}
|
||||
href={link.href}
|
||||
className={`flex-col items-center sm:flex-row ${
|
||||
link.mobileMenu ? "hidden sm:flex" : "flex"
|
||||
link.withAuthOnly && !userStore.isAuth
|
||||
? "hidden"
|
||||
: link.mobileMenu
|
||||
? "hidden sm:flex"
|
||||
: "flex"
|
||||
}`}
|
||||
>
|
||||
<span
|
||||
|
@ -86,14 +90,18 @@ export const Navbar = () => {
|
|||
})}
|
||||
</nav>
|
||||
{userStore.isAuth ? (
|
||||
<div className="flex items-center justify-center gap-2">
|
||||
<img src={userStore.user.avatar} alt="" className="w-8 h-8 rounded-full" />
|
||||
<p>{userStore.user.login}</p>
|
||||
<div className="flex flex-col items-center justify-center gap-1 sm:flex-row">
|
||||
<img
|
||||
src={userStore.user.avatar}
|
||||
alt=""
|
||||
className="w-6 h-6 rounded-full"
|
||||
/>
|
||||
<p className="text-xs sm:text-base">{userStore.user.login}</p>
|
||||
</div>
|
||||
) : (
|
||||
<Link
|
||||
href="/login"
|
||||
className="flex flex-col items-center gap-1 justify-cen ter sm:flex-row"
|
||||
className="flex flex-col items-center justify-center gap-1 sm:flex-row"
|
||||
>
|
||||
<span
|
||||
className={`w-6 h-6 iconify ${
|
||||
|
|
Loading…
Add table
Reference in a new issue