From 609848ea9d4cc25292e2c941400004dc8bc0c44b Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Tue, 6 Dec 2022 11:59:02 +0100 Subject: [PATCH] log in/registration to top rearrange sidebar to move critically important to top --- app/src/frontend/header.tsx | 40 +++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/app/src/frontend/header.tsx b/app/src/frontend/header.tsx index 826aafc6..fdc7ef63 100644 --- a/app/src/frontend/header.tsx +++ b/app/src/frontend/header.tsx @@ -19,6 +19,27 @@ interface MenuLink { function getCurrentMenuLinks(username: string): MenuLink[][] { return [ + [ + ...( + username != undefined ? + [ + { + to: "/my-account.html", + text: `Account (${username})` + } + ] : + [ + { + to: "/login.html", + text: "Log in" + }, + { + to: "/sign-up.html", + text: "Sign up" + } + ] + ) + ], [ { to: "/view/categories", @@ -114,25 +135,6 @@ function getCurrentMenuLinks(username: string): MenuLink[][] { to: "/contact.html", text: "Contact" }, - ...( - username != undefined ? - [ - { - to: "/my-account.html", - text: `Account (${username})` - } - ] : - [ - { - to: "/login.html", - text: "Log in" - }, - { - to: "/sign-up.html", - text: "Sign up" - } - ] - ) ], ]; }