wenyongda d2d96ab315 Dockerfile打包使用pnpm
next.js打包忽略eslint和typescript报错导致打包失败的问题
ant-design引入兼容包,以兼容React19
eslint配置文件由json更换成js
反馈内容由写死的改为获取当前的conversationid会话ID,反馈的用户名称username从cookie里获取
反馈弹窗弹出时使用Promise异步等待如果没有点击确定,则不传递给dify已反馈成功请求
2025-07-14 16:26:45 +08:00

47 lines
1.0 KiB
TypeScript

'use client'
import type { FC } from 'react'
import { init } from 'emoji-mart'
import data from '@emoji-mart/data'
import classNames from '@/utils/classnames'
import type { AppIconType } from '@/types/app'
init({ data })
export type AnswerIconProps = {
iconType?: AppIconType | null
icon?: string | null
background?: string | null
imageUrl?: string | null
}
const AnswerIcon: FC<AnswerIconProps> = ({
iconType,
icon,
background,
imageUrl,
}) => {
const wrapperClassName = classNames(
'flex',
'items-center',
'justify-center',
'w-full',
'h-full',
'rounded-full',
'border-[0.5px]',
'border-black/5',
'text-xl',
)
const isValidImageIcon = iconType === 'image' && imageUrl
return <div
className={wrapperClassName}
style={{ background: background || '#D5F5F6' }}
>
{isValidImageIcon
? <img src={imageUrl} className="w-full h-full rounded-full" alt="answer icon" />
: (icon && icon !== '') ? (<em-emoji id={icon} />) : (<em-emoji id='🤖' />) }
</div>
}
export default AnswerIcon