removing unused nextPrompt function

This commit is contained in:
Seth Forsgren 2022-11-24 23:02:42 -08:00
parent c5a1ef7fd1
commit e01cb50181
2 changed files with 0 additions and 20 deletions

View File

@ -7,14 +7,12 @@ interface PromptPanelProps {
prompts: PromptInput[];
addPrompt: (prompt: string) => void;
changePrompt: (prompt: string, index: number) => void;
nextPrompt: () => void;
}
export default function PromptPanel({
prompts,
addPrompt,
changePrompt,
nextPrompt,
}: PromptPanelProps) {
const inputPrompt = useRef(null);
@ -59,13 +57,6 @@ export default function PromptPanel({
autoComplete="off"
/>
</form>
{/* Test button */}
<button
title="Add"
className="fixed z-90 top-48 right-8 bg-slate-100 w-14 h-14 rounded-full drop-shadow-lg"
onClick={() => nextPrompt()}
></button>
</div>
</main>
</>

View File

@ -366,17 +366,6 @@ export default function Home() {
newPromptInputs[index].prompt = prompt;
setPromptInputs(newPromptInputs);
}}
nextPrompt={() => {
// if there are no upcoming prompts, don't do anything
var promptLastIndex = promptInputs.length - 1;
if (
promptInputs[promptLastIndex].prompt == "" &&
promptInputs[promptLastIndex - 1].prompt == ""
) {
return;
}
setPromptInputs([...promptInputs, { prompt: "" }]);
}}
/>
<Info />