Merged in feat/3614-basicInfo (pull request #3427)

feat(SW-3614): use new loyalty prop in basicProfile

* feat(SW-3614): use new loyalty prop in basicProfile

* PR fixes


Approved-by: Matilda Landström
This commit is contained in:
Linus Flood
2026-01-15 14:02:28 +00:00
parent b9d134bca6
commit 7639daf792
12 changed files with 83 additions and 46 deletions

View File

@@ -6,7 +6,7 @@ import { safeTry } from "@scandic-hotels/common/utils/safeTry"
import { safeProtectedProcedure } from "../../../procedures"
import { isValidSession } from "../../../utils/session"
import { getVerifiedUser } from "../../user/utils/getVerifiedUser"
import { getBasicUser } from "../../user/utils/getBasicUser"
import { getPrimaryLinks } from "./getPrimaryLinks"
import { getSecondaryLinks } from "./getSecondaryLinks"
@@ -40,14 +40,14 @@ export const myPagesNavigation = safeProtectedProcedure
}
const [user, error] = await safeTry(
getVerifiedUser({ token: ctx.session.token })
getBasicUser({ token: ctx.session.token })
)
if (!user || error) {
return null
}
const [primaryLinks, secondaryLinks] = await Promise.all([
getPrimaryLinks({ lang, userLoyalty: user.loyalty }),
getPrimaryLinks({ lang, basicUserLoyalty: user.loyalty }),
getSecondaryLinks({ lang }),
])