diff --git a/frontend/src/views/analysis/AnnotationScaling/AnnotationScaling.tsx b/frontend/src/views/analysis/AnnotationScaling/AnnotationScaling.tsx index 60d3100bd..6717ca424 100644 --- a/frontend/src/views/analysis/AnnotationScaling/AnnotationScaling.tsx +++ b/frontend/src/views/analysis/AnnotationScaling/AnnotationScaling.tsx @@ -29,12 +29,12 @@ function AnnotationScaling() { const codes = ProjectHooks.useGetAllCodes(projectId, false); const [code, setCode] = useState(null); - const [antiCode, setAntiCode] = useState(null); + const [opposingCode, setopposingCode] = useState(null); const [accept, setAccept] = useState([]); const [reject, setReject] = useState([]); // global server state (react-query) - const suggestions = AnnoscalingHooks.useAnnotationSuggestions(projectId, code?.id, antiCode?.id); + const suggestions = AnnoscalingHooks.useAnnotationSuggestions(projectId, code?.id, opposingCode?.id); const confirmHook = AnnoscalingHooks.useConfirmSuggestions(); const handleSubmit = () => { @@ -42,7 +42,7 @@ function AnnotationScaling() { { requestBody: { code_id: code!.id, - reject_code_id: antiCode!.id, + reject_code_id: opposingCode!.id, project_id: projectId, accept: accept.map((r) => ({ sdoc_id: r.sdoc_id, sentence: r.sentence_id })), reject: reject.map((r) => ({ sdoc_id: r.sdoc_id, sentence: r.sentence_id })), @@ -102,15 +102,15 @@ function AnnotationScaling() { sx={{ width: 300 }} renderInput={(params) => ( - - + + )} autoHighlight selectOnFocus clearOnBlur handleHomeEndKeys - onChange={(_event, value, _reason) => setAntiCode(value)} + onChange={(_event, value, _reason) => setopposingCode(value)} />