import { GridProps, SimpleGrid, Skeleton, Stat, StatLabel, StatNumber, } from '@chakra-ui/react' import { Stats } from 'models' import React from 'react' export const StatsCards = ({ stats, ...props }: { stats?: Stats } & GridProps) => { return ( Views {stats ? ( {stats.totalViews} ) : ( )} Starts {stats ? ( {stats.totalStarts} ) : ( )} Completion rate {stats ? ( {Math.round((stats.totalCompleted / stats.totalStarts) * 100)}% ) : ( )} ) }