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