|
@@ -36,14 +36,14 @@ export const BookmarkFolderTree: React.FC<Props> = (props: Props) => {
|
|
|
const { t } = useTranslation();
|
|
const { t } = useTranslation();
|
|
|
|
|
|
|
|
const { data: currentUser } = useCurrentUser();
|
|
const { data: currentUser } = useCurrentUser();
|
|
|
- const shouldMutateCurrentUserbookmarks = currentUser._id !== userId;
|
|
|
|
|
|
|
+ const shouldMutateCurrentUserbookmarks = currentUser?._id !== userId;
|
|
|
|
|
|
|
|
const { data: isReadOnlyUser } = useIsReadOnlyUser();
|
|
const { data: isReadOnlyUser } = useIsReadOnlyUser();
|
|
|
const { data: currentPage } = useSWRxCurrentPage();
|
|
const { data: currentPage } = useSWRxCurrentPage();
|
|
|
const { mutate: mutateBookmarkInfo } = useSWRBookmarkInfo(currentPage?._id);
|
|
const { mutate: mutateBookmarkInfo } = useSWRBookmarkInfo(currentPage?._id);
|
|
|
const { data: bookmarkFolders, mutate: mutateBookmarkFolders } = useSWRxBookmarkFolderAndChild(userId);
|
|
const { data: bookmarkFolders, mutate: mutateBookmarkFolders } = useSWRxBookmarkFolderAndChild(userId);
|
|
|
const { data: userBookmarks, mutate: mutateUserBookmarks } = useSWRxUserBookmarks(userId);
|
|
const { data: userBookmarks, mutate: mutateUserBookmarks } = useSWRxUserBookmarks(userId);
|
|
|
- const { mutate: mutateCurrentUserBookmarks } = useSWRxUserBookmarks(shouldMutateCurrentUserbookmarks ? currentUser._id : null);
|
|
|
|
|
|
|
+ const { mutate: mutateCurrentUserBookmarks } = useSWRxUserBookmarks(shouldMutateCurrentUserbookmarks ? currentUser?._id : null);
|
|
|
const { open: openDeleteModal } = usePageDeleteModal();
|
|
const { open: openDeleteModal } = usePageDeleteModal();
|
|
|
|
|
|
|
|
const bookmarkFolderTreeMutation = useCallback(() => {
|
|
const bookmarkFolderTreeMutation = useCallback(() => {
|