Spaces:
Sleeping
Sleeping
axeronis commited on
Commit ·
5281b4d
1
Parent(s): ea76e96
Fix: Add Template type to useQuery for templates
Browse files
frontend/app/settings/playbook/page.tsx
CHANGED
|
@@ -161,12 +161,12 @@ export default function PlaybookEditorPage() {
|
|
| 161 |
})
|
| 162 |
|
| 163 |
// React Query for templates - cached!
|
| 164 |
-
const { data: templatesData } = useQuery({
|
| 165 |
queryKey: ['playbook-templates'],
|
| 166 |
queryFn: playbookApi.getTemplates,
|
| 167 |
enabled: !!user,
|
| 168 |
})
|
| 169 |
-
const templates = templatesData?.templates || []
|
| 170 |
|
| 171 |
const [formData, setFormData] = useState({
|
| 172 |
name: '',
|
|
|
|
| 161 |
})
|
| 162 |
|
| 163 |
// React Query for templates - cached!
|
| 164 |
+
const { data: templatesData } = useQuery<{ templates: Template[] }>({
|
| 165 |
queryKey: ['playbook-templates'],
|
| 166 |
queryFn: playbookApi.getTemplates,
|
| 167 |
enabled: !!user,
|
| 168 |
})
|
| 169 |
+
const templates: Template[] = templatesData?.templates || []
|
| 170 |
|
| 171 |
const [formData, setFormData] = useState({
|
| 172 |
name: '',
|