refactor: ScriptTemplateList — add onConfigure prop threading
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import { TemplateCard } from './TemplateCard'
|
|||||||
interface Props {
|
interface Props {
|
||||||
inputValue: string
|
inputValue: string
|
||||||
onClearSearch: () => void
|
onClearSearch: () => void
|
||||||
|
onConfigure: (id: string) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
function TemplateSkeleton() {
|
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 templates = useScriptGeneratorStore(s => s.templates)
|
||||||
const isLoadingTemplates = useScriptGeneratorStore(s => s.isLoadingTemplates)
|
const isLoadingTemplates = useScriptGeneratorStore(s => s.isLoadingTemplates)
|
||||||
|
|
||||||
@@ -61,7 +62,7 @@ export function ScriptTemplateList({ inputValue, onClearSearch }: Props) {
|
|||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-2 p-2">
|
<div className="flex flex-col gap-2 p-2">
|
||||||
{templates.map(template => (
|
{templates.map(template => (
|
||||||
<TemplateCard key={template.id} template={template} />
|
<TemplateCard key={template.id} template={template} onConfigure={onConfigure} />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user