Skip to content

Commit

Permalink
Clean up code based on PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jpeltzi committed Jul 28, 2023
1 parent 727205c commit 1e42ff4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions client/src/components/SortingQuestion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ interface Props {
}

export default function SortingQuestion(props: Props) {
console.log(props);
const { surveyLanguage, tr } = useTranslations();
const [verified, setVerified] = useState(props.value ? true : false);
const [sortedOptionIds, setSortedOptionIds] = useState(
Expand All @@ -48,7 +47,7 @@ export default function SortingQuestion(props: Props) {
return result;
};

const onDragEnd = (result: DropResult, provided: ResponderProvided):void => {
const onDragEnd = (result: DropResult, provided: ResponderProvided) => {
const { destination, source } = result;
if (!destination || destination.index === source.index) {
provided.announce(tr.SortingQuestion.announcement.droppedInPlace
Expand Down Expand Up @@ -143,7 +142,6 @@ export default function SortingQuestion(props: Props) {
label={tr.SortingQuestion.orderComplete}
control={
<Checkbox
// TS can't infer the precise memoized value type from question.type, but for checkboxes it's always an array
name={`verify-order-question_${props.question.id}`}
checked={verified}
onChange={(event) => {
Expand Down

0 comments on commit 1e42ff4

Please sign in to comment.