chore: fix type annotations (#6600)

This commit is contained in:
非法操作
2024-07-25 11:21:51 +08:00
committed by GitHub
parent 9815aab7a3
commit 585444c50c
12 changed files with 27 additions and 21 deletions

View File

@@ -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 = () => {

View File

@@ -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"