perf: 文案提示;删除账号

This commit is contained in:
Archer
2023-03-14 12:54:37 +08:00
parent 7f96c4ff9b
commit e12f97a73b
9 changed files with 26 additions and 26 deletions

View File

@@ -243,9 +243,9 @@ const Chat = ({ chatId, windowId }: { chatId: string; windowId?: string }) => {
if (typeof fnMap[chatSiteData.chatModel] === 'function') {
await fnMap[chatSiteData.chatModel](requestPrompt);
}
} catch (err) {
} catch (err: any) {
toast({
title: typeof err === 'string' ? err : '聊天出错了~',
title: typeof err === 'string' ? err : err?.message || '聊天出错了~',
status: 'warning',
duration: 5000,
isClosable: true

View File

@@ -12,8 +12,10 @@ import {
Td,
TableContainer,
Select,
Input
Input,
IconButton
} from '@chakra-ui/react';
import { DeleteIcon } from '@chakra-ui/icons';
import { useForm, useFieldArray } from 'react-hook-form';
import { UserUpdateParams } from '@/types/user';
import { putUserInfo } from '@/api/user';
@@ -130,7 +132,15 @@ const NumberSetting = () => {
></Input>
</Td>
<Td>
<Button onClick={() => removeAccount(i)}></Button>
<IconButton
aria-label="删除账号"
icon={<DeleteIcon />}
colorScheme={'red'}
onClick={() => {
removeAccount(i);
handleSubmit(onclickSave)();
}}
/>
</Td>
</Tr>
))}