minor tweak
This commit is contained in:
parent
238c9066bc
commit
d8e8d7752a
|
@ -5,13 +5,11 @@ import { useRef } from "react";
|
||||||
|
|
||||||
interface PromptPanelProps {
|
interface PromptPanelProps {
|
||||||
prompts: PromptInput[];
|
prompts: PromptInput[];
|
||||||
addPrompt: (prompt: string) => void;
|
|
||||||
changePrompt: (prompt: string, index: number) => void;
|
changePrompt: (prompt: string, index: number) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function PromptPanel({
|
export default function PromptPanel({
|
||||||
prompts,
|
prompts,
|
||||||
addPrompt,
|
|
||||||
changePrompt,
|
changePrompt,
|
||||||
}: PromptPanelProps) {
|
}: PromptPanelProps) {
|
||||||
const inputPrompt = useRef(null);
|
const inputPrompt = useRef(null);
|
||||||
|
|
|
@ -367,9 +367,6 @@ export default function Home() {
|
||||||
|
|
||||||
<PromptPanel
|
<PromptPanel
|
||||||
prompts={promptInputs}
|
prompts={promptInputs}
|
||||||
addPrompt={(prompt: string) => {
|
|
||||||
setPromptInputs([...promptInputs, { prompt: prompt }]);
|
|
||||||
}}
|
|
||||||
changePrompt={(prompt: string, index: number) => {
|
changePrompt={(prompt: string, index: number) => {
|
||||||
const newPromptInputs = [...promptInputs];
|
const newPromptInputs = [...promptInputs];
|
||||||
newPromptInputs[index].prompt = prompt;
|
newPromptInputs[index].prompt = prompt;
|
||||||
|
|
Loading…
Reference in New Issue