Merge pull request #997 from matkoniecz/feature/account_management_is_important

log in/registration to top
This commit is contained in:
Mike Simpson 2022-12-06 11:18:00 +00:00 committed by GitHub
commit 8ea153a1da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"
}
]
)
],
];
}