From ed61d8c8e69cc806b3f5a7f21754d0e3d0874a48 Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 27 Sep 2024 19:49:08 +0100 Subject: [PATCH] fix navbar buttons --- src/components/navbar/navbar.tsx | 16 ++++++++-------- src/components/navbar/profile-button.tsx | 16 +++++----------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/components/navbar/navbar.tsx b/src/components/navbar/navbar.tsx index 57e17e0..f562938 100644 --- a/src/components/navbar/navbar.tsx +++ b/src/components/navbar/navbar.tsx @@ -33,6 +33,8 @@ const renderNavbarItem = (item: NavbarItem) => ( ); export default function Navbar() { + const rightItem = items[items.length - 1]; + return (
@@ -41,18 +43,16 @@ export default function Navbar() { {items.slice(0, -1).map((item, index) => ( - - {renderNavbarItem(item)} - + + {renderNavbarItem(item)} + ))}
{/* Right-aligned item */} - - - {renderNavbarItem(items[items.length - 1])} - - + + {renderNavbarItem(rightItem)} +
); diff --git a/src/components/navbar/profile-button.tsx b/src/components/navbar/profile-button.tsx index c224fa3..3b22f56 100644 --- a/src/components/navbar/profile-button.tsx +++ b/src/components/navbar/profile-button.tsx @@ -19,19 +19,13 @@ export default function ProfileButton() { } return ( - - + + - +

You

- -
+
+ ); }