Forwarding the real task id in backend interactions and ensure the labeling task works

This commit is contained in:
Keith Stevens
2023-01-11 19:32:52 +09:00
parent 14fa08e2e7
commit 268cd7d7b5
5 changed files with 14 additions and 18 deletions
+1 -2
View File
@@ -13,9 +13,8 @@ export const LabelTask = ({
taskType,
onReplyChanged,
}: TaskSurveyProps<{ text: string; labels: { [k: string]: number }; message_id: string }>) => {
const [sliderValues, setSliderValues] = useState<number[]>([]);
const valid_labels = task.valid_labels;
const [sliderValues, setSliderValues] = useState<number[]>(new Array(valid_labels.length).fill(0));
useEffect(() => {
onReplyChanged({ content: { labels: {}, text: task.reply, message_id: task.message_id }, state: "DEFAULT" });