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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user