refactor: shows 0 instead of nan for new users (#140)
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -15,7 +15,7 @@ node_modules
|
||||
|
||||
# Testing
|
||||
coverage
|
||||
|
||||
.idea
|
||||
# Turbo
|
||||
.turbo
|
||||
|
||||
|
@@ -239,7 +239,7 @@ const DashboardItemCard: React.FC<DashboardItemCardProps> = ({
|
||||
{count}
|
||||
</div>
|
||||
{status !== "total" ? (
|
||||
<div className="text-sm pb-1">{(percentage * 100).toFixed(0)}%</div>
|
||||
<div className="text-sm pb-1">{count > 0 ? (percentage * 100).toFixed(0) : 0}%</div>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user