File tree Expand file tree Collapse file tree 2 files changed +7
-16
lines changed
Expand file tree Collapse file tree 2 files changed +7
-16
lines changed Original file line number Diff line number Diff line change 3333 "react-native" : " ^0.57.1"
3434 },
3535 "devDependencies" : {
36- "babel-eslint" : " ^8.0.0" ,
37- "eslint" : " ^4.5.0" ,
38- "eslint-plugin-react" : " ^7.0.0" ,
39- "metro-react-native-babel-preset" : " ^0.59.0" ,
40- "react" : " ^16.13.1" ,
41- "react-native" : " ^0.57.1"
36+ "metro-react-native-babel-preset" : " ^0.59.0"
4237 },
4338 "dependencies" : {
4439 "prop-types" : " ^15.7.2" ,
Original file line number Diff line number Diff line change @@ -38,17 +38,13 @@ const Rating = ({
3838 return (
3939 < StyledView >
4040 < BackgroundStars >
41- < StarIcon name = { icon } size = { size } color = { ratingBackgroundColor } />
42- < StarIcon name = { icon } size = { size } color = { ratingBackgroundColor } />
43- < StarIcon name = { icon } size = { size } color = { ratingBackgroundColor } />
44- < StarIcon name = { icon } size = { size } color = { ratingBackgroundColor } />
45- < StarIcon name = { icon } size = { size } color = { ratingBackgroundColor } />
41+ { Array . from ( { length : totalCount } , ( _ , i ) => (
42+ < StarIcon name = { icon } size = { size } color = { ratingBackgroundColor } />
43+ ) ) }
4644 < ColoredStars percentage = { percentage } >
47- < StarIcon name = { icon } size = { size } color = { ratingColor } />
48- < StarIcon name = { icon } size = { size } color = { ratingColor } />
49- < StarIcon name = { icon } size = { size } color = { ratingColor } />
50- < StarIcon name = { icon } size = { size } color = { ratingColor } />
51- < StarIcon name = { icon } size = { size } color = { ratingColor } />
45+ { Array . from ( { length : totalCount } , ( _ , i ) => (
46+ < StarIcon name = { icon } size = { size } color = { ratingColor } />
47+ ) ) }
5248 </ ColoredStars >
5349 </ BackgroundStars >
5450 </ StyledView >
You can’t perform that action at this time.
0 commit comments