chore: remove console.log (#54623)

This commit is contained in:
afc163 2025-08-07 23:07:37 +08:00 committed by GitHub
parent 6de357d8f9
commit 7cea3bb0b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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