fix: add correct login button instead of sending everyone to my pages

This commit is contained in:
Christel Westerberg
2024-11-01 13:08:00 +01:00
parent e547f8c83e
commit e2e2d786bd
7 changed files with 27 additions and 17 deletions

View File

@@ -1,5 +1,4 @@
import { MembershipLevelEnum } from "@/constants/membershipLevels"
import { myPages } from "@/constants/routes/myPages"
import {
getMembershipLevelSafely,
getMyPagesNavigation,
@@ -7,7 +6,7 @@ import {
} from "@/lib/trpc/memoizedRequests"
import { serverClient } from "@/lib/trpc/server"
import Link from "@/components/TempDesignSystem/Link"
import LoginButton from "@/components/LoginButton"
import { getIntl } from "@/i18n"
import { getLang } from "@/i18n/serverContext"
@@ -50,16 +49,17 @@ export default async function MyPagesMenuWrapper() {
/>
</>
) : (
<Link
href={myPages[lang]}
<LoginButton
className={styles.loginLink}
aria-label={intl.formatMessage({ id: "Log in/Join" })}
position="top menu"
trackingId="loginStartNewTopMenu"
>
<Avatar />
<span className={styles.userName}>
{intl.formatMessage({ id: "Log in/Join" })}
</span>
</Link>
</LoginButton>
)}
</>
)