refactor: ScriptTemplateList — add onConfigure prop threading

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-03-13 12:30:13 -04:00
parent 40ebd2b200
commit cad9dc83bd

View File

@@ -5,6 +5,7 @@ import { TemplateCard } from './TemplateCard'
interface Props {
inputValue: string
onClearSearch: () => void
onConfigure: (id: string) => void
}
function TemplateSkeleton() {
@@ -20,7 +21,7 @@ function TemplateSkeleton() {
)
}
export function ScriptTemplateList({ inputValue, onClearSearch }: Props) {
export function ScriptTemplateList({ inputValue, onClearSearch, onConfigure }: Props) {
const templates = useScriptGeneratorStore(s => s.templates)
const isLoadingTemplates = useScriptGeneratorStore(s => s.isLoadingTemplates)
@@ -61,7 +62,7 @@ export function ScriptTemplateList({ inputValue, onClearSearch }: Props) {
return (
<div className="flex flex-col gap-2 p-2">
{templates.map(template => (
<TemplateCard key={template.id} template={template} />
<TemplateCard key={template.id} template={template} onConfigure={onConfigure} />
))}
</div>
)