Skip to content

Commit

Permalink
FE: show number of downVotes for suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
venetrius committed Feb 17, 2024
1 parent add5c52 commit 3910fff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/Pages/Suggestion/SuggestionList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const SuggestionList = ({ argument }) => {
return (
<Collapse activeKey={activePanelKey} onChange={setActivePanelKey}>
{Object.keys(suggestionsByArgumentPoints).map((section, index) => {
const sectionText = argument.argumentDetails[section]
const sectionText = argument.argumentDetails[section] || "Addition(s)"
const sectionTitle = `${section} - ${sectionText.slice(0,30)}...`
return (
<Panel
Expand All @@ -59,7 +59,7 @@ const SuggestionList = ({ argument }) => {
<VoteButton
onVote={(voteType) => voteOnSuggestion(argument.id, suggestion.id, voteType)}
onUnvote={() => deleteSuggestionVote(argument.id, suggestion.id)}
votes={suggestion.numberOfLikes}
votes={suggestion.numberOfLikes - suggestion.numberOfDislikes}
userVote={suggestion.likedByCurrentUser ? 1 : 0}
/>
</div>
Expand Down

0 comments on commit 3910fff

Please sign in to comment.