site: use message hooks usage (#48862)

* refactor(iconSearch): use message hooks usage

* fix: use useApp
This commit is contained in:
thinkasany 2024-05-10 15:35:16 +08:00 committed by GitHub
parent 32b89e6d87
commit 1f39811047
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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<CategoryProps> = (props) => {
const { message } = App.useApp();
const { icons, title, newIcons, theme } = props;
const intl = useIntl();
const [justCopied, setJustCopied] = React.useState<string | null>(null);