Files
ollama-webui2/components/Promptbar/components/Prompts.tsx
2023-10-02 02:04:06 +02:00

23 lines
445 B
TypeScript

import { FC } from 'react';
import { Prompt } from '@/types/prompt';
import { PromptComponent } from './Prompt';
interface Props {
prompts: Prompt[];
}
export const Prompts: FC<Props> = ({ prompts }) => {
return (
<div className="flex w-full flex-col gap-1">
{prompts
.slice()
.reverse()
.map((prompt, index) => (
<PromptComponent key={index} prompt={prompt} />
))}
</div>
);
};