Commit 8b048818 by weiyudumei

fix: 修复 isAsking is not defined 错误

- 在 ChatAnswerAttchment.tsx 中添加 React 导入
- 在 Collect.tsx 中显式传递 isAsking prop
parent cdd72345
// src/pages/Chat/components/ChatItem/ChatAnswerAttchment.tsx // src/pages/Chat/components/ChatItem/ChatAnswerAttchment.tsx
import React, { useState } from 'react'
import { Button, Link } from '@heroui/react' import { Button, Link } from '@heroui/react'
import { motion } from 'framer-motion' import { motion } from 'framer-motion'
import { useState } from 'react'
import { CardWorkflowForm } from './CardWorkflowForm' import { CardWorkflowForm } from './CardWorkflowForm'
import type { Answer, Attachment } from '@/types/chat' import type { Answer, Attachment } from '@/types/chat'
import AnswerProDetailIcon from '@/assets/svg/answerProDetail.svg?react' import AnswerProDetailIcon from '@/assets/svg/answerProDetail.svg?react'
......
...@@ -155,7 +155,7 @@ export const Collect: React.FC = () => { ...@@ -155,7 +155,7 @@ export const Collect: React.FC = () => {
</div> </div>
<div className="flex-1"> <div className="flex-1">
<MarkdownDetail>{formatMarkdown(item.answer || '')}</MarkdownDetail> <MarkdownDetail>{formatMarkdown(item.answer || '')}</MarkdownDetail>
{item.cardList && item.cardList?.length !== 0 && <ChatAnswerAttachment answer={item} />} {item.cardList && item.cardList?.length !== 0 && <ChatAnswerAttachment answer={item} isAsking={false} />}
<div className="mt-[12px] flex gap-[4px] justify-between items-center"> <div className="mt-[12px] flex gap-[4px] justify-between items-center">
<div className="text-12px text-[#B2B8C1]">{item.collectionTime}</div> <div className="text-12px text-[#B2B8C1]">{item.collectionTime}</div>
<div> <div>
......
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