Skip to content

Commit

Permalink
chore: missing code replication
Browse files Browse the repository at this point in the history
Perhaps it would make sense to refactor this..
  • Loading branch information
DavideIadeluca committed Feb 27, 2024
1 parent 8f35161 commit 49ce742
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/src/forum/components/Poll/PollResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import abbreviateNumber from 'flarum/common/utils/abbreviateNumber';

interface PollResultsAttrs extends ComponentAttrs {
option: PollOptionModel;
name: String;
state: PollState;
}

Expand All @@ -25,10 +26,10 @@ export default class PollResults extends Component<PollResultsAttrs> {

return (
<label className="PollResult">
<PollOptionInput id={option.id()} isResult={false} name="vote" value="Vote for this option" />
<PollOptionInput id={option.id()} isResult={false} name={this.attrs.name} value={option.answer()} />
<span className="PollResult-information">
<div className="PollResult-row">
<PollOptionLabel text={option.answer()} />
<PollOptionLabel id={option.id()} name={this.attrs.name} text={option.answer()} />
<PollResultsNumber number={abbreviateNumber(voteCount)} />
</div>

Expand Down

0 comments on commit 49ce742

Please sign in to comment.