refactor & perf: import { noop } from 'lodash-es' across web (#17439)
This commit is contained in:
parent
7016ccef10
commit
c05e03fc09
87 changed files with 271 additions and 184 deletions
|
|
@ -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: [],
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue