mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-10 03:16:51 +08:00
chore: fix type annotations (#6600)
This commit is contained in:
@@ -2,15 +2,15 @@ import { useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { XMarkIcon } from '@heroicons/react/24/outline'
|
||||
import NotionPageSelector from '../base'
|
||||
import type { NotionPageSelectorValue } from '../base'
|
||||
import s from './index.module.css'
|
||||
import type { NotionPage } from '@/models/common'
|
||||
import cn from '@/utils/classnames'
|
||||
import Modal from '@/app/components/base/modal'
|
||||
|
||||
type NotionPageSelectorModalProps = {
|
||||
isShow: boolean
|
||||
onClose: () => void
|
||||
onSave: (selectedPages: NotionPageSelectorValue[]) => void
|
||||
onSave: (selectedPages: NotionPage[]) => void
|
||||
datasetId: string
|
||||
}
|
||||
const NotionPageSelectorModal = ({
|
||||
@@ -20,12 +20,12 @@ const NotionPageSelectorModal = ({
|
||||
datasetId,
|
||||
}: NotionPageSelectorModalProps) => {
|
||||
const { t } = useTranslation()
|
||||
const [selectedPages, setSelectedPages] = useState<NotionPageSelectorValue[]>([])
|
||||
const [selectedPages, setSelectedPages] = useState<NotionPage[]>([])
|
||||
|
||||
const handleClose = () => {
|
||||
onClose()
|
||||
}
|
||||
const handleSelectPage = (newSelectedPages: NotionPageSelectorValue[]) => {
|
||||
const handleSelectPage = (newSelectedPages: NotionPage[]) => {
|
||||
setSelectedPages(newSelectedPages)
|
||||
}
|
||||
const handleSave = () => {
|
||||
|
||||
@@ -191,7 +191,7 @@ const SimpleSelect: FC<ISelectProps> = ({
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
setSelectedItem(null)
|
||||
onSelect({ value: null })
|
||||
onSelect({ name: '', value: '' })
|
||||
}}
|
||||
className="h-5 w-5 text-gray-400 cursor-pointer"
|
||||
aria-hidden="false"
|
||||
|
||||
Reference in New Issue
Block a user