diff --git a/src/lib/utils/rarity.ts b/src/lib/utils/rarity.ts index cfb45f2d..e736794c 100644 --- a/src/lib/utils/rarity.ts +++ b/src/lib/utils/rarity.ts @@ -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),