mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-18 14:59:42 +02:00
Namespaced template functions (#95)
This commit is contained in:
@@ -8,6 +8,7 @@ export function useRenderTemplate(template: string) {
|
||||
const environmentId = useActiveEnvironment()[0]?.id ?? null;
|
||||
return useQuery<string>({
|
||||
placeholderData: (prev) => prev, // Keep previous data on refetch
|
||||
refetchOnWindowFocus: false,
|
||||
queryKey: ['render_template', template],
|
||||
queryFn: () => renderTemplate({ template, workspaceId, environmentId }),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user