Skip to content

Commit

Permalink
update initialVote on submit
Browse files Browse the repository at this point in the history
  • Loading branch information
venix12 committed Dec 23, 2023
1 parent 6c7dc42 commit 3cc53de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/js/contest-judge/entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface Props {
@observer
export default class Entry extends React.Component<Props> {
@observable private comment: string;
private readonly initialVote?: ContestJudgeVoteJson;
@observable private initialVote?: ContestJudgeVoteJson;
@observable private posting = false;
@observable private readonly scores: ContestJudgeScoreJson[];
@observable private xhr?: JQuery.jqXHR;
Expand Down Expand Up @@ -182,6 +182,7 @@ export default class Entry extends React.Component<Props> {
.fail(onError)
.done((json: ContestEntryJson) => runInAction(() => {
this.props.store.update(json);
this.initialVote = json.current_user_judge_vote;
})).always(action(() => {
this.posting = false;
this.xhr = undefined;
Expand Down

0 comments on commit 3cc53de

Please sign in to comment.