Skip to content

Commit

Permalink
clarify field name
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenAsJade committed Oct 16, 2024
1 parent b077035 commit 8974627
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/views/ReportsCenter/ModerationActionSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export function ModerationActionSelector({
const reportedBySelf = user.id === report.reporting_user.id;

const [selectedOption, setSelectedOption] = React.useState("");
const [mod_note, setModNote] = React.useState("");
const [community_mod_note, setModNote] = React.useState("");
const [voted, setVoted] = React.useState(false);

const updateSelectedAction = (e: React.ChangeEvent<HTMLInputElement>) => {
Expand Down Expand Up @@ -219,7 +219,7 @@ export function ModerationActionSelector({
"Reason for escalating?",
)}
rows={5}
value={mod_note}
value={community_mod_note}
onChange={(ev) => setModNote(ev.target.value)}
/>
)}
Expand All @@ -236,11 +236,13 @@ export function ModerationActionSelector({
<button
className="success"
disabled={
voted || !selectedOption || (selectedOption === "escalate" && !mod_note)
voted ||
!selectedOption ||
(selectedOption === "escalate" && !community_mod_note)
}
onClick={() => {
setVoted(true);
submit(selectedOption, mod_note);
submit(selectedOption, community_mod_note);
}}
>
{llm_pgettext("A label on a button for submitting a vote", "Vote")}
Expand Down

0 comments on commit 8974627

Please sign in to comment.