(level: QuestLevel)
| 59 | export type { QuestDestination } from './QuestCard'; |
| 60 | |
| 61 | const getLevelProgress = (level: QuestLevel) => { |
| 62 | const totalForLevel = level.xpInLevel + level.xpToNextLevel; |
| 63 | |
| 64 | if (!totalForLevel) { |
| 65 | return 0; |
| 66 | } |
| 67 | |
| 68 | return Math.min(100, (level.xpInLevel / totalForLevel) * 100); |
| 69 | }; |
| 70 | |
| 71 | const QUEST_LEVEL_PROGRESS_SIZE = 40; |
| 72 | const QUEST_LEVEL_PROGRESS_STROKE = 4; |
no outgoing calls
no test coverage detected