Skip to content

Commit 523124f

Browse files
committed
f-0 small fix
1 parent 064d2d9 commit 523124f

2 files changed

Lines changed: 11 additions & 15 deletions

File tree

  • bases/rsptx/assignment_server_api/assignment_builder/src/components/routes

bases/rsptx/assignment_server_api/assignment_builder/src/components/routes/AssignmentBuilder/components/exercises/components/CreateExercise/components/ParsonsExercise/components/ParsonsBlocksManager.tsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
import {
2+
defaultDropAnimation,
23
DndContext,
3-
KeyboardSensor,
4-
PointerSensor,
5-
useSensor,
6-
useSensors,
74
DragEndEvent,
8-
DragStartEvent,
95
DragMoveEvent,
106
DragOverlay,
11-
defaultDropAnimation,
12-
MeasuringStrategy
7+
DragStartEvent,
8+
KeyboardSensor,
9+
MeasuringStrategy,
10+
PointerSensor,
11+
useSensor,
12+
useSensors
1313
} from "@dnd-kit/core";
1414
import {
1515
SortableContext,
1616
sortableKeyboardCoordinates,
1717
verticalListSortingStrategy
1818
} from "@dnd-kit/sortable";
1919
import { Button, UnstyledButton } from "@mantine/core";
20-
import React, { FC, useState, useCallback, useRef, useMemo } from "react";
20+
import { FC, useCallback, useMemo, useRef, useState } from "react";
2121

2222
import { Icon } from "@/components/ui/Icon";
2323
import { ParsonsBlock } from "@/utils/preview/parsonsPreview";
@@ -527,9 +527,7 @@ export const ParsonsBlocksManager: FC<ParsonsBlocksManagerProps> = ({
527527
(id: string, isCorrect: boolean) => {
528528
if (!isCorrect) return;
529529

530-
// TODO(eslint): Rename the callback parameter without obscuring the surrounding block value.
531-
// eslint-disable-next-line @typescript-eslint/no-shadow
532-
const block = blocks.find((block) => block.id === id);
530+
const block = blocks.find((blockItem) => blockItem.id === id);
533531

534532
if (!block || !block.groupId) return;
535533

bases/rsptx/assignment_server_api/assignment_builder/src/components/routes/Grader/hooks/useStudentNavigation.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,10 @@ export const useStudentNavigation = (opts: Options): StudentNavigation => {
7676
);
7777

7878
const goToQuestion = useCallback(
79-
// TODO(eslint): Rename the local options parameter without changing this public callback shape.
80-
// eslint-disable-next-line @typescript-eslint/no-shadow
81-
(targetQid: number, opts?: { selectLast?: boolean }) => {
79+
(targetQid: number, options?: { selectLast?: boolean }) => {
8280
if (isDemo) return;
8381
navigate(`/grader/${aid}/questions/${targetQid}`, {
84-
state: opts?.selectLast ? { selectLast: true } : undefined
82+
state: options?.selectLast ? { selectLast: true } : undefined
8583
});
8684
},
8785
[aid, isDemo, navigate]

0 commit comments

Comments
 (0)