Commit db645324 authored by littleforest's avatar littleforest

feat: changed input value

parent 0a0af752
......@@ -31,10 +31,10 @@ const Chat: React.FC = () => {
const [selectSiderTabs, setSelectSiderTabs] = useState('');
const [open, setOpen] = useState(false);
const tabShow = showSider ;
const tabShow = showSider;
const questionValue = form.getFieldValue('chatInput');
console.log(questionValue);
useEffect(() => {
if (!isMobile) {
setShowSider(true);
......@@ -42,7 +42,7 @@ const Chat: React.FC = () => {
}, [isMobile]);
let token = '';
useEffect(() => {
useEffect(() => {
if (localStorage.getItem('user')) {
token = JSON.parse(localStorage.user)?.token;
}
......@@ -59,7 +59,7 @@ const Chat: React.FC = () => {
};
const setInput = (value: any) => {
setChat(value?.firstChat);
setChat(value?.firstInput);
form.setFieldValue('chatInput', value?.firstInput);
};
......@@ -191,12 +191,8 @@ const Chat: React.FC = () => {
onValuesChange={onChange}
onFinish={onSend}
>
{console.log(chat)}
{firstChat ? (
<NewSession
questionValue={chat}
answerValue=''
/>
<NewSession questionValue={chat} answerValue="" />
) : (
<div className={classNames(isMobile && styles.mobileContent)}>
<Item name="firstInput">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment