import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { range } from '/imports/utils/array-utils';
import { defineMessages, injectIntl } from 'react-intl';
import Styled from './styles';
import { uniqueId } from '/imports/utils/string-utils';
const intlMessages = defineMessages({
legendTitle: {
id: 'app.meeting-ended.rating.legendLabel',
description: 'label for star feedback legend',
},
starLabel: {
id: 'app.meeting-ended.rating.starLabel',
description: 'label for feedback stars',
},
});
const propTypes = {
intl: PropTypes.object.isRequired,
onRate: PropTypes.func.isRequired,
total: PropTypes.string.isRequired,
};
class Rating extends Component {
constructor(props) {
super(props);
this.clickStar = this.clickStar.bind(this);
}
shouldComponentUpdate() {
// when component re render lost checked item
return false;
}
clickStar(e) {
const { onRate } = this.props;
onRate(e);
}
renderStars(num) {
const { intl } = this.props;
return (