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
|
# Testing
|
||||||
coverage
|
coverage
|
||||||
|
.idea
|
||||||
# Turbo
|
# Turbo
|
||||||
.turbo
|
.turbo
|
||||||
|
|
||||||
|
@@ -239,7 +239,7 @@ const DashboardItemCard: React.FC<DashboardItemCardProps> = ({
|
|||||||
{count}
|
{count}
|
||||||
</div>
|
</div>
|
||||||
{status !== "total" ? (
|
{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}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user