Conditionally disable auth

This commit is contained in:
Gregory Schier
2025-11-26 10:30:16 -08:00
parent dfa6f1c5b4
commit 79dd50474d
11 changed files with 348 additions and 117 deletions

View File

@@ -132,12 +132,13 @@ function InitializedTemplateFunctionDialog({
const debouncedTagText = useDebouncedValue(tagText.data ?? '', 400);
const [renderKey, setRenderKey] = useState<string | null>(null);
const rendered = useRenderTemplate(
debouncedTagText,
previewType !== 'none',
previewType === 'click' ? 'send' : 'preview',
previewType === 'live' ? renderKey + debouncedTagText : renderKey,
);
const rendered = useRenderTemplate({
template: debouncedTagText,
enabled: previewType !== 'none',
purpose: previewType === 'click' ? 'send' : 'preview',
refreshKey: previewType === 'live' ? renderKey + debouncedTagText : renderKey,
ignoreError: false,
});
const tooLarge = rendered.data ? rendered.data.length > 10000 : false;
// biome-ignore lint/correctness/useExhaustiveDependencies: Only update this on rendered data change to keep secrets hidden on input change