mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-15 13:38:29 +02:00
chore: remove console.log (#54623)
This commit is contained in:
parent
6de357d8f9
commit
7cea3bb0b4
1 changed files with 1 additions and 12 deletions
|
@ -48,7 +48,7 @@ const IconSearch: React.FC = () => {
|
|||
|
||||
const handleSearchIcon = debounce((e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
setDisplayState((prevState) => ({ ...prevState, searchKey: e.target.value }));
|
||||
}, 400);
|
||||
}, 300);
|
||||
|
||||
const handleChangeTheme = useCallback((value: ThemeType) => {
|
||||
setDisplayState((prevState) => ({ ...prevState, theme: value as ThemeType }));
|
||||
|
@ -56,8 +56,6 @@ const IconSearch: React.FC = () => {
|
|||
|
||||
const renderCategories = useMemo<React.ReactNode | React.ReactNode[]>(() => {
|
||||
const { searchKey = '', theme } = displayState;
|
||||
// console.log('displayState:', displayState);
|
||||
// console.log('metaInfo:', metaInfo);
|
||||
// loop over metaInfo to find all the icons which has searchKey in their tags
|
||||
let normalizedSearchKey = searchKey?.trim();
|
||||
|
||||
|
@ -70,8 +68,6 @@ const IconSearch: React.FC = () => {
|
|||
|
||||
const tagMatchedCategoryObj = matchCategoriesFromTag(normalizedSearchKey, metaInfo);
|
||||
|
||||
// console.log('categoriesMatchedAgainstTag:', tagMatchedCategoryObj);
|
||||
|
||||
const namedMatchedCategoryObj = Object.keys(categories).reduce(
|
||||
(acc, key) => {
|
||||
let iconList = categories[key as CategoriesKeys];
|
||||
|
@ -98,12 +94,6 @@ const IconSearch: React.FC = () => {
|
|||
|
||||
// merge matched categories from tag search
|
||||
const merged = mergeCategory(namedMatchedCategoryObj, tagMatchedCategoryObj);
|
||||
// console.log(
|
||||
// 'namedMatchedCategoryObj, tagMatchedCategoryObj:',
|
||||
// namedMatchedCategoryObj,
|
||||
// tagMatchedCategoryObj,
|
||||
// );
|
||||
// console.log('merged:', merged);
|
||||
const matchedCategories = Object.values(merged)
|
||||
.map((item) => {
|
||||
item.icons = item.icons
|
||||
|
@ -113,7 +103,6 @@ const IconSearch: React.FC = () => {
|
|||
return item;
|
||||
})
|
||||
.filter(({ icons }) => !!icons.length);
|
||||
// console.log('matchedCategories:', matchedCategories);
|
||||
|
||||
const categoriesResult = matchedCategories.map(({ category, icons }) => (
|
||||
<Category
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue