Chore/cleanup warnings (#17974)

This commit is contained in:
crazywoola
2025-04-14 11:27:14 +08:00
committed by GitHub
parent f84832e0c2
commit 8f9cbe1c49
69 changed files with 89 additions and 117 deletions

View File

@@ -14,10 +14,7 @@ type IAccountSettingProps = {
langeniusVersionInfo: LangGeniusVersionResponse
onCancel: () => void
}
const buttonClassName = `
shrink-0 flex items-center h-8 px-3 rounded-lg border border-gray-200
text-xs text-gray-800 font-medium
`
export default function AccountAbout({
langeniusVersionInfo,
onCancel,

View File

@@ -24,7 +24,7 @@ const WorkplaceSelector = () => {
notify({ type: 'success', message: t('common.actionMsg.modifiedSuccessfully') })
location.assign(`${location.origin}`)
}
catch (e) {
catch {
notify({ type: 'error', message: t('common.provider.saveFailed') })
}
}

View File

@@ -1,12 +1,10 @@
import useSWR from 'swr'
import { useTranslation } from 'react-i18next'
import DataSourceNotion from './data-source-notion'
import DataSourceWebsite from './data-source-website'
import { fetchDataSource } from '@/service/common'
import { DataSourceProvider } from '@/models/common'
export default function DataSourcePage() {
const { t } = useTranslation()
const { data } = useSWR({ url: 'data-source/integrates' }, fetchDataSource)
const notionWorkspaces = data?.data.filter(item => item.provider === 'notion') || []

View File

@@ -21,7 +21,7 @@ const EditWorkspaceModal = ({
}: IEditWorkspaceModalProps) => {
const { t } = useTranslation()
const { notify } = useContext(ToastContext)
const { currentWorkspace, isCurrentWorkspaceOwner, mutateCurrentWorkspace } = useAppContext()
const { currentWorkspace, isCurrentWorkspaceOwner } = useAppContext()
const [name, setName] = useState<string>(currentWorkspace.name)
const changeWorkspaceInfo = async (name: string) => {
@@ -35,7 +35,7 @@ const EditWorkspaceModal = ({
notify({ type: 'success', message: t('common.actionMsg.modifiedSuccessfully') })
location.assign(`${location.origin}`)
}
catch (e) {
catch {
notify({ type: 'error', message: t('common.actionMsg.modifiedUnsuccessfully') })
}
}

View File

@@ -49,7 +49,7 @@ const InviteModal = ({
onSend(invitation_results)
}
}
catch (e) { }
catch { }
}
else {
notify({ type: 'error', message: t('common.members.emailInvalid') })

View File

@@ -53,7 +53,7 @@ const Operation = ({
onOperate()
notify({ type: 'success', message: t('common.actionMsg.modifiedSuccessfully') })
}
catch (e) {
catch {
}
}
@@ -66,7 +66,7 @@ const Operation = ({
onOperate()
notify({ type: 'success', message: t('common.actionMsg.modifiedSuccessfully') })
}
catch (e) {
catch {
}
}

View File

@@ -85,7 +85,6 @@ const ModelParameterModal: FC<ModelParameterModalProps> = ({
renderTrigger,
readonly,
isInWorkflow,
scope = 'text-generation',
}) => {
const { t } = useTranslation()
const { isAPIKeySet } = useProviderContext()