diff --git a/packages/client/src/components/document/collaboration/index.tsx b/packages/client/src/components/document/collaboration/index.tsx index 27a0492..7ab8951 100644 --- a/packages/client/src/components/document/collaboration/index.tsx +++ b/packages/client/src/components/document/collaboration/index.tsx @@ -51,9 +51,7 @@ export const DocumentCollaboration: React.FC = ({ wikiId, documentId, di const toastedUsersRef = useRef>([]); const { user: currentUser } = useUser(); const [visible, toggleVisible] = useToggle(false); - const { users, loading, error, addUser, updateUser, deleteUser } = useDoumentMembers(documentId, { - enabled: visible, - }); + const { users, loading, error, addUser, updateUser, deleteUser } = useDoumentMembers(documentId); const [inviteUser, setInviteUser] = useState(''); const [collaborationUsers, setCollaborationUsers] = useState([]); diff --git a/packages/client/src/components/document/version/index.tsx b/packages/client/src/components/document/version/index.tsx index 15c3782..f661135 100644 --- a/packages/client/src/components/document/version/index.tsx +++ b/packages/client/src/components/document/version/index.tsx @@ -24,7 +24,7 @@ const { Title, Text } = Typography; export const DocumentVersion: React.FC = ({ documentId, disabled = false, onSelect }) => { const { isMobile } = IsOnMobile.useHook(); const [visible, toggleVisible] = useToggle(false); - const { data, loading, error, refresh } = useDocumentVersion(documentId, { enabled: visible }); + const { data, loading, error, refresh } = useDocumentVersion(documentId); const [selectedVersion, setSelectedVersion] = useState(null); const editor = useEditor({ diff --git a/packages/client/src/data/document.tsx b/packages/client/src/data/document.tsx index ef8317c..b2f41d1 100644 --- a/packages/client/src/data/document.tsx +++ b/packages/client/src/data/document.tsx @@ -206,7 +206,7 @@ export const getDocumentVersion = ( */ export const useDocumentVersion = ( documentId, - options: UseQueryOptions> + options: UseQueryOptions> = {} ) => { const { data, error, isLoading, refetch } = useQuery( DocumentApiDefinition.getVersionById.client(documentId),