fix: allow any membership level

This commit is contained in:
Michael Zetterberg
2024-08-27 07:40:07 +02:00
parent fcf0f58ab8
commit 2ea6a2d242
4 changed files with 9 additions and 5 deletions

View File

@@ -63,6 +63,7 @@ function getInitialState({ user, lang }: { user?: User; lang: Lang }) {
}
}
if (!membership.membershipLevel) return null
// @ts-expect-error: membership levels needs proper fix
const level = membershipLevels[membership.membershipLevel]
switch (level) {
@@ -155,6 +156,7 @@ export default function OverviewTable({
let activeMembershipLevel: membershipLevels | null = null
if (activeMembership?.membershipLevel) {
// @ts-expect-error: membershiplevel needs proper fix
activeMembershipLevel = membershipLevels[activeMembership?.membershipLevel]
}