refactor & perf: import { noop } from 'lodash-es' across web (#17439)
This commit is contained in:
@@ -14,6 +14,7 @@ import { Tag03 } from '@/app/components/base/icons/src/vender/line/financeAndECo
|
||||
import Checkbox from '@/app/components/base/checkbox'
|
||||
import type { Label } from '@/app/components/tools/labels/constant'
|
||||
import { useTags } from '@/app/components/plugins/hooks'
|
||||
import { noop } from 'lodash-es'
|
||||
|
||||
type LabelSelectorProps = {
|
||||
value: string[]
|
||||
@@ -99,7 +100,7 @@ const LabelSelector: FC<LabelSelectorProps> = ({
|
||||
<Checkbox
|
||||
className='shrink-0'
|
||||
checked={value.includes(label.name)}
|
||||
onCheck={() => { }}
|
||||
onCheck={noop}
|
||||
/>
|
||||
<div title={label.label} className='grow truncate text-sm leading-5 text-text-secondary'>{label.label}</div>
|
||||
</div>
|
||||
|
||||
@@ -13,6 +13,7 @@ import Loading from '@/app/components/base/loading'
|
||||
import Form from '@/app/components/header/account-setting/model-provider-page/model-modal/Form'
|
||||
import { LinkExternal02 } from '@/app/components/base/icons/src/vender/line/general'
|
||||
import { useLanguage } from '@/app/components/header/account-setting/model-provider-page/hooks'
|
||||
import { noop } from 'lodash-es'
|
||||
|
||||
type Props = {
|
||||
collection: Collection
|
||||
@@ -28,7 +29,7 @@ const ConfigCredential: FC<Props> = ({
|
||||
onCancel,
|
||||
onSaved,
|
||||
isHideRemoveBtn,
|
||||
onRemove = () => { },
|
||||
onRemove = noop,
|
||||
isSaving,
|
||||
}) => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
@@ -6,6 +6,7 @@ import cn from '@/utils/classnames'
|
||||
import Button from '@/app/components/base/button'
|
||||
import Modal from '@/app/components/base/modal'
|
||||
import { AlertTriangle } from '@/app/components/base/icons/src/vender/solid/alertsAndFeedback'
|
||||
import { noop } from 'lodash-es'
|
||||
|
||||
type ConfirmModalProps = {
|
||||
show: boolean
|
||||
@@ -20,7 +21,7 @@ const ConfirmModal = ({ show, onConfirm, onClose }: ConfirmModalProps) => {
|
||||
<Modal
|
||||
className={cn('w-[600px] max-w-[600px] p-8')}
|
||||
isShow={show}
|
||||
onClose={() => { }}
|
||||
onClose={noop}
|
||||
>
|
||||
<div className='absolute right-4 top-4 cursor-pointer p-2' onClick={onClose}>
|
||||
<RiCloseLine className='h-4 w-4 text-text-tertiary' />
|
||||
|
||||
Reference in New Issue
Block a user