aikido change requests
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user