import React from 'react' import { SourceAttribution } from '@/lib/bots/bing/types' export interface LearnMoreProps { sourceAttributions?: SourceAttribution[] } export function LearnMore({ sourceAttributions }: LearnMoreProps) { if (!sourceAttributions?.length) { return null } return (
了解详细信息:
{sourceAttributions.map((attribution, index) => { const { providerDisplayName, seeMoreUrl } = attribution const { host } = new URL(seeMoreUrl) return ( {index + 1}. {host} ) })}
) }