refactor: AI搜索空状态文案改为可配置
This commit is contained in:
@@ -12,21 +12,19 @@ interface AISearchResult {
|
|||||||
interface AISearchResultsProps {
|
interface AISearchResultsProps {
|
||||||
results: AISearchResult[]
|
results: AISearchResult[]
|
||||||
locale: string
|
locale: string
|
||||||
|
emptyText: string
|
||||||
translations: {
|
translations: {
|
||||||
viewDetails: string
|
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) {
|
if (results.length === 0) {
|
||||||
return (
|
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-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>
|
<div className="text-4xl mb-4">🔍</div>
|
||||||
<p className="text-gray-600 dark:text-gray-400 font-display">
|
<p className="text-gray-600 dark:text-gray-400 font-display">
|
||||||
未找到相关项目,试试其他描述吧
|
{emptyText}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user