Skip to content

Commit 841f340

Browse files
committed
rename anti-code to opposing-code
1 parent ad13478 commit 841f340

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

frontend/src/views/analysis/AnnotationScaling/AnnotationScaling.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ function AnnotationScaling() {
2929
const codes = ProjectHooks.useGetAllCodes(projectId, false);
3030

3131
const [code, setCode] = useState<CodeRead | null>(null);
32-
const [antiCode, setAntiCode] = useState<CodeRead | null>(null);
32+
const [opposingCode, setopposingCode] = useState<CodeRead | null>(null);
3333
const [accept, setAccept] = useState<AnnoscalingResult[]>([]);
3434
const [reject, setReject] = useState<AnnoscalingResult[]>([]);
3535

3636
// global server state (react-query)
37-
const suggestions = AnnoscalingHooks.useAnnotationSuggestions(projectId, code?.id, antiCode?.id);
37+
const suggestions = AnnoscalingHooks.useAnnotationSuggestions(projectId, code?.id, opposingCode?.id);
3838
const confirmHook = AnnoscalingHooks.useConfirmSuggestions();
3939

4040
const handleSubmit = () => {
4141
confirmHook.mutate(
4242
{
4343
requestBody: {
4444
code_id: code!.id,
45-
reject_code_id: antiCode!.id,
45+
reject_code_id: opposingCode!.id,
4646
project_id: projectId,
4747
accept: accept.map((r) => ({ sdoc_id: r.sdoc_id, sentence: r.sentence_id })),
4848
reject: reject.map((r) => ({ sdoc_id: r.sdoc_id, sentence: r.sentence_id })),
@@ -102,15 +102,15 @@ function AnnotationScaling() {
102102
sx={{ width: 300 }}
103103
renderInput={(params) => (
104104
<Stack direction="row" alignItems="center">
105-
<SquareIcon style={{ color: antiCode?.color ?? "white" }}></SquareIcon>
106-
<TextField autoFocus {...params} label="Anti-Code"></TextField>
105+
<SquareIcon style={{ color: opposingCode?.color ?? "white" }}></SquareIcon>
106+
<TextField autoFocus {...params} label="Opposing-Code"></TextField>
107107
</Stack>
108108
)}
109109
autoHighlight
110110
selectOnFocus
111111
clearOnBlur
112112
handleHomeEndKeys
113-
onChange={(_event, value, _reason) => setAntiCode(value)}
113+
onChange={(_event, value, _reason) => setopposingCode(value)}
114114
/>
115115
<Button
116116
variant="contained"

0 commit comments

Comments
 (0)