import React, { useState } from "react"; export function ComparisonActuator({ listOfElements, pairCurrentlyBeingCompared, moveToNextStep, isListOrdered, }) { const initialComparisonString = "x to y"; const [comparisonString, setComparisonString] = useState("x to y"); const onChangeComparisonString = async (event) => { if (!isListOrdered) { await setComparisonString(event.target.value); } }; const onClickSubmitEvent = (event) => { if (!isListOrdered) { moveToNextStep({ listOfElements, pairCurrentlyBeingCompared, comparisonString, }); setComparisonString(initialComparisonString); } }; return (