基本信息
- 类型: React Server 组件
- 路径:
./src/components/prompts/related-prompts.tsx
功能描述
相关Prompt组件,用于展示与当前Prompt相关的其他Prompt列表。以网格卡片形式展示,包含标题、类型、描述、作者和投票数。
导出内容
RelatedPrompts - 主组件
RelatedPromptsProps - Props接口
Props 接口
| 属性 | 类型 | 说明 |
| prompts | RelatedPrompt[] | 相关Prompt数组 |
| 属性 | 类型 | 说明 |
| id | string | Prompt ID |
| title | string | 标题 |
| slug | string \ | null | 别名 |
| description | string \ | null | 描述 |
| type | string | 类型 |
| author | object | 作者信息 |
| category | object \ | null | 分类信息 |
| _count.votes | number | 投票数 |
依赖
next/link - Next.js链接
next-intl - 国际化
lucide-react - 图标库
@/components/ui/avatar - 头像组件
@/components/ui/badge - 徽章组件
@/lib/urls - URL工具
相关组件
PromptDetail - Prompt详情页的相关推荐
PromptCard - 卡片样式参考