From 1f39811047b1baf3b8f909cdecc6e7fa65d3f917 Mon Sep 17 00:00:00 2001 From: thinkasany <480968828@qq.com> Date: Fri, 10 May 2024 15:35:16 +0800 Subject: [PATCH] site: use message hooks usage (#48862) * refactor(iconSearch): use message hooks usage * fix: use useApp --- .dumi/theme/builtins/IconSearch/Category.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.dumi/theme/builtins/IconSearch/Category.tsx b/.dumi/theme/builtins/IconSearch/Category.tsx index 1cbbdf4c57..51162c45c2 100644 --- a/.dumi/theme/builtins/IconSearch/Category.tsx +++ b/.dumi/theme/builtins/IconSearch/Category.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { useIntl } from 'dumi'; -import { message } from 'antd'; +import { App } from 'antd'; import CopyableIcon from './CopyableIcon'; import type { ThemeType } from './index'; import type { CategoriesKeys } from './fields'; @@ -13,6 +13,7 @@ interface CategoryProps { } const Category: React.FC = (props) => { + const { message } = App.useApp(); const { icons, title, newIcons, theme } = props; const intl = useIntl(); const [justCopied, setJustCopied] = React.useState(null);