export function formatYuan(cents?: number | null): string {
  const value = Number(cents ?? 0)
  const safeValue = Number.isFinite(value) ? value : 0
  return `¥${(safeValue / 100).toFixed(2)}`
}

export function formatPoints(points?: number | null): string {
  const value = Number(points ?? 0)
  const safeValue = Number.isFinite(value) ? value : 0
  return safeValue.toLocaleString()
}
