Merged in feat/LOY-354-L7-Progress-Card (pull request #2786)
Feat/LOY-354 L7 Progress Card * feat(LOY-354): Add Trophy icon * fix(LOY-354): include new tierPoints value * feat(LOY-354): L7 Progress Level Card support * refactor(LOY-354): Refactoring of component structure * fix(LOY-354): Remove intl prop drilling * fix(LOY-354): cleanup progress section code Approved-by: Erik Tiekstra
This commit is contained in:
+30
@@ -0,0 +1,30 @@
|
||||
import { calculateProgress } from "../utils"
|
||||
import ProgressSection from "./ProgressSection"
|
||||
import StatsSection from "./StatsSection"
|
||||
|
||||
import styles from "../levelProgressCard.module.css"
|
||||
|
||||
interface ProgressCardLowerLevelProps {
|
||||
earned: number
|
||||
toNext: number
|
||||
toKeepCurrent?: number
|
||||
}
|
||||
|
||||
export default function ProgressCardLowerLevel({
|
||||
earned,
|
||||
toNext,
|
||||
toKeepCurrent,
|
||||
}: ProgressCardLowerLevelProps) {
|
||||
const progress = calculateProgress(earned, earned + toNext, toKeepCurrent)
|
||||
|
||||
return (
|
||||
<div className={styles.innerCard}>
|
||||
<StatsSection earned={earned} remaining={toNext} />
|
||||
<ProgressSection
|
||||
earned={earned}
|
||||
progress={progress}
|
||||
toKeepCurrent={toKeepCurrent}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user