mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-07 00:34:41 +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: "Закладки",
|
title: "Закладки",
|
||||||
href: "/bookmarks",
|
href: "/bookmarks",
|
||||||
withAuthOnly: true,
|
withAuthOnly: true,
|
||||||
mobileMenu: true,
|
mobileMenu: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 4,
|
id: 4,
|
||||||
|
@ -66,7 +66,11 @@ export const Navbar = () => {
|
||||||
key={link.id}
|
key={link.id}
|
||||||
href={link.href}
|
href={link.href}
|
||||||
className={`flex-col items-center sm:flex-row ${
|
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
|
<span
|
||||||
|
@ -86,14 +90,18 @@ export const Navbar = () => {
|
||||||
})}
|
})}
|
||||||
</nav>
|
</nav>
|
||||||
{userStore.isAuth ? (
|
{userStore.isAuth ? (
|
||||||
<div className="flex items-center justify-center gap-2">
|
<div className="flex flex-col items-center justify-center gap-1 sm:flex-row">
|
||||||
<img src={userStore.user.avatar} alt="" className="w-8 h-8 rounded-full" />
|
<img
|
||||||
<p>{userStore.user.login}</p>
|
src={userStore.user.avatar}
|
||||||
|
alt=""
|
||||||
|
className="w-6 h-6 rounded-full"
|
||||||
|
/>
|
||||||
|
<p className="text-xs sm:text-base">{userStore.user.login}</p>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<Link
|
<Link
|
||||||
href="/login"
|
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
|
<span
|
||||||
className={`w-6 h-6 iconify ${
|
className={`w-6 h-6 iconify ${
|
||||||
|
|
Loading…
Add table
Reference in a new issue