MCPcopy Create free account
hub / github.com/github/docs / Union

Function Union

components/graphql/Union.tsx:12–30  ·  view source on GitHub ↗
({ item }: Props)

Source from the content-addressed store, hash-verified

10}
11
12export function Union({ item }: Props) {
13 const { locale } = useRouter()
14 const { t } = useTranslation('products')
15 const heading = t('graphql.reference.possible_types')
16
17 return (
18 <GraphqlItem item={item} heading={heading}>
19 <ul>
20 {item.possibleTypes.map((type) => (
21 <li key={type.id}>
22 <Link href={type.href} locale={locale}>
23 {type.name}
24 </Link>
25 </li>
26 ))}
27 </ul>
28 </GraphqlItem>
29 )
30}

Callers

nothing calls this directly

Calls 1

useTranslationFunction · 0.90

Tested by

no test coverage detected