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


); }