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
|
|
@ -12,6 +12,7 @@ import type { ICurrentWorkspace, LangGeniusVersionResponse, UserProfileResponse
|
|||
import MaintenanceNotice from '@/app/components/header/maintenance-notice'
|
||||
import type { SystemFeatures } from '@/types/feature'
|
||||
import { defaultSystemFeatures } from '@/types/feature'
|
||||
import { noop } from 'lodash-es'
|
||||
|
||||
export type AppContextValue = {
|
||||
apps: App[]
|
||||
|
|
@ -54,7 +55,7 @@ const initialWorkspaceInfo: ICurrentWorkspace = {
|
|||
const AppContext = createContext<AppContextValue>({
|
||||
systemFeatures: defaultSystemFeatures,
|
||||
apps: [],
|
||||
mutateApps: () => { },
|
||||
mutateApps: noop,
|
||||
userProfile: {
|
||||
id: '',
|
||||
name: '',
|
||||
|
|
@ -68,8 +69,8 @@ const AppContext = createContext<AppContextValue>({
|
|||
isCurrentWorkspaceOwner: false,
|
||||
isCurrentWorkspaceEditor: false,
|
||||
isCurrentWorkspaceDatasetOperator: false,
|
||||
mutateUserProfile: () => { },
|
||||
mutateCurrentWorkspace: () => { },
|
||||
mutateUserProfile: noop,
|
||||
mutateCurrentWorkspace: noop,
|
||||
pageContainerRef: createRef(),
|
||||
langeniusVersionInfo: initialLangeniusVersionInfo,
|
||||
useSelector,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue