mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: domain purchase stat
This commit is contained in:
@@ -18,8 +18,10 @@ export default function StatisticsPage() {
|
||||
getStatistics().then(setStats)
|
||||
}, [])
|
||||
|
||||
const totalDomainPurchase = (stats?.domainPurchased ?? 0) + (stats?.domainPurchaseFailed ?? 0)
|
||||
|
||||
const successRate = stats !== undefined ?
|
||||
(stats.domainPurchaseFailed === 0 ? undefined : stats.domainPurchased / stats.domainPurchaseFailed)
|
||||
(totalDomainPurchase === 0 ? undefined : stats.domainPurchased / totalDomainPurchase)
|
||||
: undefined
|
||||
|
||||
return <>
|
||||
|
||||
Reference in New Issue
Block a user