aikido change requests

This commit is contained in:
EthanHealy01
2026-04-23 18:59:36 +01:00
parent a0f294e68e
commit eaed8feb42
2 changed files with 4 additions and 4 deletions
@@ -174,9 +174,9 @@ export function LocalEmbedPDF({
} else if (url) {
setPdfUrl(url);
}
// `url` omitted intentionally — file presence takes priority; URL changes trigger
// remount via fileStableKey anyway.
}, [fileStableKey]);
// When file is present, use the stable key to avoid blob URL churn from FileContext
// re-renders. When only url is provided, depend on url directly so changes are picked up.
}, [file ? fileStableKey : url]);
// Keyed by fileStableKey to avoid recomputing on every FileContext re-render.
const exportFileName = useMemo(() => {
+1 -1
View File
@@ -36,7 +36,7 @@ export function useFileWithUrl(
}
// When stableKey is provided, only recreate when the file identity changes — not
// when getFiles() returns a new object reference for the same underlying file.
}, [stableKey !== undefined ? stableKey : file]);
}, [stableKey != null ? stableKey : file]);
useEffect(() => {
const url = result?.url;