Merged in feat/LOY-423-Nights-Stayed-Progress-for-L6-Members (pull request #3360)

feat(LOY-423): Add progress bar for L6 members showing nights stayed

* feat(LOY-423): Add progress bar for L6 members showing nights stayed

* chore(LOY-423): shorten css selector


Approved-by: Matilda Landström
This commit is contained in:
Chuma Mcphoy (We Ahead)
2025-12-17 10:45:30 +00:00
parent 3dce2d310f
commit ac53f128af
6 changed files with 267 additions and 8 deletions

View File

@@ -13,6 +13,7 @@ import { Typography } from "@scandic-hotels/design-system/Typography"
import { compareAllLevels, faq } from "@/constants/webHrefs"
import useLang from "@/hooks/useLang"
import { getTierStartDate } from "@/utils/getTierStartDate"
import styles from "./LevelProgressModal.module.css"
@@ -28,14 +29,7 @@ export default function LevelProgressModal({
const intl = useIntl()
const lang = useLang()
// calculate tierStarts by tierExpires
let tierStarts: string | null = null
if (tierExpires) {
const date = new Date(tierExpires)
date.setFullYear(date.getFullYear() - 1)
tierStarts = date.toISOString().split("T")[0]
}
const tierStarts = getTierStartDate(tierExpires)
return (
<Modal