import { Rate } from '@/components'; import Image from 'next/image'; import { RightArrowIcon } from '@/assets/chatacter'; import IconFont from '@/components/ui/iconFont'; import ChatButton from './ChatButton'; import Tags from '@/components/ui/Tags'; type CharacterBasicInfoProps = { characterId: string; characterDetail?: any; }; export default function CharacterBasicInfo({ characterId, characterDetail, }: CharacterBasicInfoProps) { if (!characterDetail) { return null; } const from = characterDetail?.from || "The CEO's Contract Wife"; const avatar = characterDetail?.avatar || '/test.png'; const fromImage = characterDetail?.fromImage || '/images/character/from.png'; const characterName = characterDetail?.name || '未知角色'; return (
{/* 角色头像 - 使用 figure 语义化标签 */}
{`${characterName}
{/* 角色名称 - 使用 header 和 h1 */}

{characterName}

{/* 角色基本信息 - 使用定义列表 */}
ID
{characterDetail.id}
年龄
{characterDetail.age ?? '18'}
角色类型
{characterDetail.role}
{/* 角色评分 */}
{/* 角色TAG */} {characterDetail.tags && characterDetail.tags.length > 0 && (
({ label: tag, value: tag, }))} />
)} {/* divider */} {/* description - 使用 section 和语义化标签 */} {characterDetail.description && (

Description:

{characterDetail.description}

)} {/* from and chat */}
{/* FROM - 使用语义化标签 */} {from && (
{`${from}
Form: {` ${from}`}
)} {/* Chat Button - 客户端组件 */}
); }