add getRarityPrefix helper for url generation
This commit is contained in:
parent
89d4c9df7b
commit
764f85400a
1 changed files with 8 additions and 0 deletions
|
|
@ -8,6 +8,14 @@ export function getRarityLabel(rarity: number): string {
|
|||
return RARITY_LABELS[rarity] || '—'
|
||||
}
|
||||
|
||||
/**
|
||||
* Get rarity prefix for URL generation (e.g., "SSR", "SR", "R")
|
||||
* Returns empty string for unknown rarity values
|
||||
*/
|
||||
export function getRarityPrefix(rarity: number): string {
|
||||
return RARITY_LABELS[rarity] || ''
|
||||
}
|
||||
|
||||
export function getRarityOptions() {
|
||||
return Object.entries(RARITY_LABELS).map(([value, label]) => ({
|
||||
value: Number(value),
|
||||
|
|
|
|||
Loading…
Reference in a new issue