mirror of
https://github.com/outline/outline.git
synced 2026-12-04 02:20:17 +03:00
preload
This commit is contained in:
1 parent
8f3139da7a
commit
05b3a39f4d
1 file changed
+7
@@ -34,6 +34,13 @@ export const MentionDocument = observer(function MentionDocument_(
|
||||
const { isSelected, node } = props;
|
||||
const { documents } = useStores();
|
||||
const doc = documents.get(node.attrs.modelId);
|
||||
const modelId = node.attrs.modelId;
|
||||
|
||||
React.useEffect(() => {
|
||||
if (modelId) {
|
||||
void documents.prefetchDocument(modelId);
|
||||
}
|
||||
}, [modelId, documents]);
|
||||
|
||||
return (
|
||||
<Link
|
||||
|
||||
Reference in new issue
Block a user