Chore/cleanup warnings (#17974)
This commit is contained in:
parent
f84832e0c2
commit
8f9cbe1c49
69 changed files with 89 additions and 117 deletions
|
|
@ -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') || []
|
||||
|
||||
|
|
|
|||
|
|
@ -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') })
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ const InviteModal = ({
|
|||
onSend(invitation_results)
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
catch { }
|
||||
}
|
||||
else {
|
||||
notify({ type: 'error', message: t('common.members.emailInvalid') })
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,6 @@ const ModelParameterModal: FC<ModelParameterModalProps> = ({
|
|||
renderTrigger,
|
||||
readonly,
|
||||
isInWorkflow,
|
||||
scope = 'text-generation',
|
||||
}) => {
|
||||
const { t } = useTranslation()
|
||||
const { isAPIKeySet } = useProviderContext()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue