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
|
|
@ -24,6 +24,7 @@ import { useProviderContext } from '@/context/provider-context'
|
|||
import { useToastContext } from '@/app/components/base/toast'
|
||||
import { EDUCATION_VERIFYING_LOCALSTORAGE_ITEM } from '@/app/education-apply/constants'
|
||||
import { getLocaleOnClient } from '@/i18n'
|
||||
import { noop } from 'lodash-es'
|
||||
|
||||
const EducationApplyAge = () => {
|
||||
const { t } = useTranslation()
|
||||
|
|
@ -35,7 +36,7 @@ const EducationApplyAge = () => {
|
|||
const {
|
||||
isPending,
|
||||
mutateAsync: educationAdd,
|
||||
} = useEducationAdd({ onSuccess: () => {} })
|
||||
} = useEducationAdd({ onSuccess: noop })
|
||||
const [modalShow, setShowModal] = useState<undefined | { title: string; desc: string; onConfirm?: () => void }>(undefined)
|
||||
const { onPlanInfoChanged } = useProviderContext()
|
||||
const updateEducationStatus = useInvalidateEducationStatus()
|
||||
|
|
@ -181,8 +182,8 @@ const EducationApplyAge = () => {
|
|||
isShow={!!modalShow}
|
||||
title={modalShow?.title || ''}
|
||||
content={modalShow?.desc}
|
||||
onConfirm={modalShow?.onConfirm || (() => {})}
|
||||
onCancel={modalShow?.onConfirm || (() => {})}
|
||||
onConfirm={modalShow?.onConfirm || noop}
|
||||
onCancel={modalShow?.onConfirm || noop}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue