feat(SW-353): dynamic rewards
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import useLang from "@/hooks/useLang"
|
||||
|
||||
import styles from "./levelSummary.module.css"
|
||||
|
||||
import type { LevelSummaryProps } from "@/types/components/overviewTable"
|
||||
@@ -6,9 +10,17 @@ export default function LevelSummary({
|
||||
level,
|
||||
showDescription = true,
|
||||
}: LevelSummaryProps) {
|
||||
const lang = useLang()
|
||||
const intl = useIntl()
|
||||
return (
|
||||
<div className={styles.levelSummary}>
|
||||
<span className={styles.levelRequirements}>{level.requirement}</span>
|
||||
<span className={styles.levelRequirements}>
|
||||
{level.required_points.toLocaleString(lang)}
|
||||
{"p "}
|
||||
{level.required_nights
|
||||
? `${intl.formatMessage({ id: "or" })} ${level.required_nights} ${intl.formatMessage({ id: "nights" })}`
|
||||
: ""}
|
||||
</span>
|
||||
{showDescription && (
|
||||
<p className={styles.levelSummaryText}>{level.description}</p>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user