chore(profile): added level badges for player summary

This commit is contained in:
2026-02-09 00:52:11 +01:00
parent 0f8932b53c
commit 150b7749ae
2 changed files with 99 additions and 27 deletions
+8
View File
@@ -0,0 +1,8 @@
export function calculateExpStyles(exp: number, isSupporter = false) {
const bgColor = exp > -1 ? (exp < 2 ? '#26B0D9' : `hsl(${-exp * 5 + 100}, 85%, 50%)`) : '#666';
const fontColor = exp > 14 || exp == -1 ? 'white' : 'black';
const boxShadow = isSupporter ? `0 0 6px 2px ${bgColor};` : '';
return { 'background-color': bgColor, color: fontColor, 'box-shadow': boxShadow };
}