Skip to content

Commit

Permalink
fixed bug for ratings
Browse files Browse the repository at this point in the history
  • Loading branch information
vickyshaw29 committed Apr 21, 2022
1 parent 5b198de commit fdf4c27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ const App = () => {
}
getActiveTab();
}, [tabId]);



return (
<Router history={history}>
{/* <Header /> */}
Expand Down
3 changes: 2 additions & 1 deletion src/common/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ const Header = ({ domain, dynamicURL }) => {
for(let char of Object.keys(obj)){
totalReviews+=obj[char]
}
let val = Math.round((obj.Genuine/totalReviews)*5)
let gen=obj.Genuine?obj.Genuine:0
let val = Math.round((gen/totalReviews)*5)
setTotalReviews(val)
setDataObject(obj);
// (6/16)*5
Expand Down

0 comments on commit fdf4c27

Please sign in to comment.