lint: fix sonarjs/no-dead-store issues (#23653)

This commit is contained in:
Matri Qi
2025-08-10 11:16:43 +08:00
committed by GitHub
parent 79a3c1618f
commit ea502d36a9
19 changed files with 17 additions and 76 deletions

View File

@@ -1,4 +1,4 @@
import React, { useState } from 'react'
import React from 'react'
import type { FC } from 'react'
import { useTranslation } from 'react-i18next'
import { RiBookOpenLine } from '@remixicon/react'
@@ -28,10 +28,8 @@ const Form: FC<FormProps> = React.memo(({
}) => {
const { t, i18n } = useTranslation()
const docLink = useDocLink()
const [changeKey, setChangeKey] = useState('')
const handleFormChange = (key: string, val: string) => {
setChangeKey(key)
if (key === 'name') {
onChange({ ...value, [key]: val })
}