= (props) => {
const { count, average, onClick, onMouseEnter, onMouseLeave } = props
return count > 0 ? (
{getStars(average, onClick, onMouseEnter)}
) : null
}
StarIndicator.displayName = "StarIndicator"
interface RatingStarIndicatorPropType extends withTranslatePropType {
average: any
count: any
}
export class RatingStarIndicator extends React.Component<
RatingStarIndicatorPropType,
{}
> {
public render() {
let { t } = this.props
if (!t) {
t = (s) => s
}
return (
{this.props.count > 0 ? (
{`${this.props.count} ` + t("book/reviews")}
) : (
{/* {this.props.t('book/reviews-is-not-enough-to-show')} */}
)}
)
}
}
export default withTranslate(RatingStarIndicator) as React.ComponentClass<
RatingStarIndicatorPropType
>