fix: Prevent API request for views (#2193)
This commit is contained in:
parent
b4c08a027b
commit
ffed38bf71
|
@ -20,8 +20,10 @@ function DocumentViews({ document, isOpen }: Props) {
|
|||
const { views, presence } = useStores();
|
||||
|
||||
React.useEffect(() => {
|
||||
if (!document.isDeleted) {
|
||||
views.fetchPage({ documentId: document.id });
|
||||
}, [views, document.id]);
|
||||
}
|
||||
}, [views, document.id, document.isDeleted]);
|
||||
|
||||
let documentPresence = presence.get(document.id);
|
||||
documentPresence = documentPresence
|
||||
|
|
Reference in New Issue