Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

fix: use @univerjs/ui useObservable (#2456)

SemmyWong8d6037dd5015
diff --git a/packages/sheets-hyper-link-ui/src/views/CellLinkPopup/index.tsx b/packages/sheets-hyper-link-ui/src/views/CellLinkPopup/index.tsx
index ae780717d3..f7caf6c72b 100644
--- a/packages/sheets-hyper-link-ui/src/views/CellLinkPopup/index.tsx
+++ b/packages/sheets-hyper-link-ui/src/views/CellLinkPopup/index.tsx
@@ -14,14 +14,14 @@
* limitations under the License.
*/
-import { useDependency, useObservable } from '@wendellhu/redi/react-bindings';
+import { useDependency } from '@wendellhu/redi/react-bindings';
import { CancelHyperLinkCommand, HyperLinkModel } from '@univerjs/sheets-hyper-link';
import React from 'react';
import { AllBorderSingle, CopySingle, LinkSingle, UnlinkSingle, WriteSingle, Xlsx } from '@univerjs/icons';
import { ICommandService, LocaleService } from '@univerjs/core';
import cs from 'clsx';
import { MessageType, Tooltip } from '@univerjs/design';
-import { IMessageService } from '@univerjs/ui';
+import { IMessageService, useObservable } from '@univerjs/ui';
import { SheetsHyperLinkPopupService } from '../../services/popup.service';
import { SheetsHyperLinkResolverService } from '../../services/resolver.service';
import { OpenHyperLinkSidebarOperation } from '../../commands/operations/sidebar.operations';
diff --git a/packages/sheets-thread-comment/src/views/sheets-thread-comment-panel/index.tsx b/packages/sheets-thread-comment/src/views/sheets-thread-comment-panel/index.tsx
index 7fd0bc8922..13ab1d14db 100644
--- a/packages/sheets-thread-comment/src/views/sheets-thread-comment-panel/index.tsx
+++ b/packages/sheets-thread-comment/src/views/sheets-thread-comment-panel/index.tsx
@@ -17,7 +17,8 @@
import type { Workbook } from '@univerjs/core';
import { ICommandService, IUniverInstanceService, UniverInstanceType } from '@univerjs/core';
import { ThreadCommentPanel, ThreadCommentPanelService } from '@univerjs/thread-comment-ui';
-import { useDependency, useObservable } from '@wendellhu/redi/react-bindings';
+import { useDependency } from '@wendellhu/redi/react-bindings';
+import { useObservable } from '@univerjs/ui';
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
import { map } from 'rxjs';
import { type IThreadComment, ThreadCommentModel } from '@univerjs/thread-comment';
diff --git a/packages/ui/src/views/components/shortcut-panel/ShortcutPanel.tsx b/packages/ui/src/views/components/shortcut-panel/ShortcutPanel.tsx
index aac2eb05ed..36741e4bb4 100644
--- a/packages/ui/src/views/components/shortcut-panel/ShortcutPanel.tsx
+++ b/packages/ui/src/views/components/shortcut-panel/ShortcutPanel.tsx
@@ -15,7 +15,8 @@
*/
import { LocaleService } from '@univerjs/core';
-import { useDependency, useObservable } from '@wendellhu/redi/react-bindings';
+import { useDependency } from '@wendellhu/redi/react-bindings';
+import { useObservable } from '@univerjs/ui';
import React, { useCallback, useEffect } from 'react';
import { IShortcutService } from '../../../services/shortcut/shortcut.service';