refactor & perf: import { noop } from 'lodash-es' across web (#17439)

This commit is contained in:
yusheng chen
2025-04-06 17:56:08 +08:00
committed by GitHub
parent 7016ccef10
commit c05e03fc09
87 changed files with 271 additions and 184 deletions

View File

@@ -14,6 +14,7 @@ import { useSelector as useAppContextSelector } from '@/context/app-context'
import type { FilterState } from './filter-management'
import { useTranslation } from 'react-i18next'
import { useTabSearchParams } from '@/hooks/use-tab-searchparams'
import { noop } from 'lodash-es'
export type PluginPageContextValue = {
containerRef: React.RefObject<HTMLDivElement>
@@ -29,15 +30,15 @@ export type PluginPageContextValue = {
export const PluginPageContext = createContext<PluginPageContextValue>({
containerRef: { current: null },
currentPluginID: undefined,
setCurrentPluginID: () => { },
setCurrentPluginID: noop,
filters: {
categories: [],
tags: [],
searchQuery: '',
},
setFilters: () => { },
setFilters: noop,
activeTab: '',
setActiveTab: () => { },
setActiveTab: noop,
options: [],
})