mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-17 01:46:07 +00:00
fix: linter error
This commit is contained in:
@@ -66,7 +66,7 @@ export default function KBDoc({ kbId }: { kbId: string }) {
|
||||
onUploadSuccess={handleUploadSuccess}
|
||||
onUploadError={handleUploadError}
|
||||
/>
|
||||
<DataTable columns={columns(handleDelete)} data={documentsList} />
|
||||
<DataTable columns={columns(handleDelete, t)} data={documentsList} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,11 +8,10 @@ import {
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuLabel,
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuTrigger,
|
||||
} from '@/components/ui/dropdown-menu';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { TFunction } from 'i18next';
|
||||
|
||||
export type DocumentFile = {
|
||||
uuid: string;
|
||||
@@ -22,8 +21,8 @@ export type DocumentFile = {
|
||||
|
||||
export const columns = (
|
||||
onDelete: (id: string) => void,
|
||||
t: TFunction,
|
||||
): ColumnDef<DocumentFile>[] => {
|
||||
const { t } = useTranslation();
|
||||
return [
|
||||
{
|
||||
accessorKey: 'name',
|
||||
|
||||
@@ -39,17 +39,10 @@ const getFormSchema = (t: (key: string) => string) =>
|
||||
|
||||
export default function KBForm({
|
||||
initKbId,
|
||||
onFormSubmit,
|
||||
onFormCancel,
|
||||
onKbDeleted,
|
||||
onNewKbCreated,
|
||||
onKbUpdated,
|
||||
}: {
|
||||
initKbId?: string;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
onFormSubmit: (value: any) => void;
|
||||
onFormCancel: () => void;
|
||||
onKbDeleted: () => void;
|
||||
onNewKbCreated: (kbId: string) => void;
|
||||
onKbUpdated: (kbId: string) => void;
|
||||
}) {
|
||||
@@ -84,7 +77,7 @@ export default function KBForm({
|
||||
const getKbConfig = async (
|
||||
kbId: string,
|
||||
): Promise<z.infer<typeof formSchema>> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
httpClient.getKnowledgeBase(kbId).then((res) => {
|
||||
resolve({
|
||||
name: res.base.name,
|
||||
|
||||
Reference in New Issue
Block a user