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
|
|
@ -1,6 +1,7 @@
|
|||
import React, { type FC } from 'react'
|
||||
import Drawer from '@/app/components/base/drawer'
|
||||
import classNames from '@/utils/classnames'
|
||||
import { noop } from 'lodash-es'
|
||||
|
||||
type IFullScreenDrawerProps = {
|
||||
isOpen: boolean
|
||||
|
|
@ -11,7 +12,7 @@ type IFullScreenDrawerProps = {
|
|||
|
||||
const FullScreenDrawer: FC<IFullScreenDrawerProps> = ({
|
||||
isOpen,
|
||||
onClose = () => {},
|
||||
onClose = noop,
|
||||
fullScreen,
|
||||
children,
|
||||
}) => {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import { useCountDown } from 'ahooks'
|
|||
import Modal from '@/app/components/base/modal'
|
||||
import Button from '@/app/components/base/button'
|
||||
import { useEventEmitterContextContext } from '@/context/event-emitter'
|
||||
import { noop } from 'lodash-es'
|
||||
|
||||
type IDefaultContentProps = {
|
||||
onCancel: () => void
|
||||
|
|
@ -120,7 +121,7 @@ const RegenerationModal: FC<IRegenerationModalProps> = ({
|
|||
})
|
||||
|
||||
return (
|
||||
<Modal isShow={isShow} onClose={() => {}} className='!max-w-[480px] !rounded-2xl'>
|
||||
<Modal isShow={isShow} onClose={noop} className='!max-w-[480px] !rounded-2xl'>
|
||||
{!loading && !updateSucceeded && <DefaultContent onCancel={onCancel} onConfirm={onConfirm} />}
|
||||
{loading && !updateSucceeded && <RegeneratingContent />}
|
||||
{!loading && updateSucceeded && <RegenerationCompletedContent onClose={onClose} />}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue