2
0

feat(results): 🛂 Limit incomplete submissions

This commit is contained in:
Baptiste Arnaud
2022-02-12 12:54:16 +01:00
parent 3a7b9a0c63
commit ec470b578c
11 changed files with 93 additions and 32 deletions

View File

@ -34,7 +34,9 @@ export const StatsCards = ({
<Stat bgColor="white" p="4" rounded="md" boxShadow="md">
<StatLabel>Completion rate</StatLabel>
{stats ? (
<StatNumber>{stats.completionRate}%</StatNumber>
<StatNumber>
{Math.round((stats.totalCompleted / stats.totalStarts) * 100)}%
</StatNumber>
) : (
<Skeleton w="50%" h="10px" mt="2" />
)}