Download src/components/learn-more.tsx from Specver/bingo: direct link, hf CLI and curl.
- Browser
- Download file 1.14 kB
-
https://huggingface.co/spaces/Specver/bingo/resolve/main/src/components/learn-more.tsx
- Command line
-
hf download hf://spaces/Specver/bingo/src/components/learn-more.tsx
-
curl -L -o learn-more.tsx https://huggingface.co/spaces/Specver/bingo/resolve/main/src/components/learn-more.tsx
1.14 kB
| 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 ( | |
| <div className="learn-more-root" role="list" aria-label="了解详细信息:"> | |
| <div className="learn-more">了解详细信息:</div> | |
| <div className="attribution-container"> | |
| <div className="attribution-items"> | |
| {sourceAttributions.map((attribution, index) => { | |
| const { providerDisplayName, seeMoreUrl } = attribution | |
| const { host } = new URL(seeMoreUrl) | |
| return ( | |
| <a | |
| key={index} | |
| className="attribution-item" | |
| target="_blank" | |
| role="listitem" | |
| href={seeMoreUrl} | |
| title={providerDisplayName} | |
| tabIndex={index} | |
| > | |
| {index + 1}. {host} | |
| </a> | |
| ) | |
| })} | |
| </div> | |
| </div> | |
| </div> | |
| ) | |
| } | |