5f483b9743
## Documentation / Examples Not sure that I need to provide type to all of components or not? Let me know if you want me to provide. - [x] Closes #38752 - [x] Make sure the linting passes by running `pnpm lint` - [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
16 lines
409 B
TypeScript
16 lines
409 B
TypeScript
export default function Categories({ categories }) {
|
|
return (
|
|
<span className="ml-1">
|
|
under
|
|
{categories.edges.length > 0 ? (
|
|
categories.edges.map((category, index) => (
|
|
<span key={index} className="ml-1">
|
|
{category.node.name}
|
|
</span>
|
|
))
|
|
) : (
|
|
<span className="ml-1">{categories.edges.node.name}</span>
|
|
)}
|
|
</span>
|
|
)
|
|
}
|