feat: improve instantiation of intl

This commit is contained in:
Michael Zetterberg
2025-04-07 07:33:28 +02:00
parent f31b374370
commit 7c82a565ae
11 changed files with 95 additions and 65 deletions

View File

@@ -12,8 +12,6 @@ import SectionWrapper from "../SectionWrapper"
import styles from "./loyaltyLevels.module.css"
import type { FormatXMLElementFn } from "intl-messageformat"
import type { LoyaltyLevelsProps } from "@/types/components/blocks/dynamicContent"
import type { LevelCardProps } from "@/types/components/overviewTable"
@@ -44,10 +42,7 @@ async function LevelCard({ level }: LevelCardProps) {
)
if (level.required_nights) {
pointsMsg = intl.formatMessage<
React.ReactNode,
FormatXMLElementFn<React.ReactNode>
>(
pointsMsg = intl.formatMessage(
{
id: "{pointsAmount, number} points <highlight>or {nightsAmount, number} nights</highlight>",
},