refactor: AI搜索空状态文案改为可配置

This commit is contained in:
2026-02-22 12:03:20 +08:00
parent 58eb6c8c23
commit 7b79fb3275
+3 -5
View File
@@ -12,21 +12,19 @@ interface AISearchResult {
interface AISearchResultsProps {
results: AISearchResult[]
locale: string
emptyText: string
translations: {
viewDetails: string
submitProjectTitle: string
submitProjectDescription: string
submitNow: string
}
}
export function AISearchResults({ results, locale, translations }: AISearchResultsProps) {
export function AISearchResults({ results, locale, emptyText, translations }: AISearchResultsProps) {
if (results.length === 0) {
return (
<div className="text-center py-12 px-4 bg-surface-light dark:bg-surface-dark border-2 border-dashed border-gray-300 dark:border-gray-700 rounded-lg">
<div className="text-4xl mb-4">🔍</div>
<p className="text-gray-600 dark:text-gray-400 font-display">
{emptyText}
</p>
</div>
)