(value: number)
| 66 | const earthRadiusM = 6_371_000; |
| 67 | |
| 68 | function pct(value: number) { |
| 69 | const percent = value * 100; |
| 70 | if (percent > 0 && percent < 1) { |
| 71 | return `${percent.toFixed(1)}%`; |
| 72 | } |
| 73 | return `${Math.round(percent)}%`; |
| 74 | } |
| 75 | |
| 76 | function challengeShareUrl(challengeId: string) { |
| 77 | return `${window.location.origin}${window.location.pathname}?challenge=${challengeId}`; |
no outgoing calls
no test coverage detected