import { IoIosStar } from 'react-icons/io'; import { Flex, Icon, Text, useColorModeValue } from '@chakra-ui/react'; export default function Ratings(props: { dark?: boolean; stats: string; stars?: 1 | 2 | 3 | 4 | 5; rating: string | number; }) { const { rating, stats, stars } = props; const gray = useColorModeValue('whiteAlpha.300', 'gray.200'); const textColor = useColorModeValue('navy.900', 'white'); return ( {stats} {stars === 1 ? ( {rating} ) : stars === 2 ? ( {rating} ) : stars === 3 ? ( {rating} ) : stars === 4 ? ( {rating} ) : stars === 5 ? ( {rating} ) : ( {rating} )} ); }