kopia lustrzana https://github.com/Stopka/fedisearch
24 wiersze
667 B
TypeScript
24 wiersze
667 B
TypeScript
import React, { ReactElement } from 'react'
|
|
import { ListFeedsItemFragment } from '../../graphql/generated/types'
|
|
import FeedResult from './FeedResult'
|
|
|
|
export default function FeedResults ({ feeds }: { feeds: ListFeedsItemFragment[] | undefined }): ReactElement {
|
|
if (feeds === undefined) {
|
|
return <></>
|
|
}
|
|
if (feeds.length === 0) {
|
|
return (
|
|
<>
|
|
<p className={'no-results'}>We have no results for your query.</p>
|
|
</>
|
|
)
|
|
}
|
|
return (<div className={'grid'}>
|
|
{
|
|
feeds.map((feed, index) => {
|
|
return (<FeedResult key={index} feed={feed} />)
|
|
})
|
|
}
|
|
</div>)
|
|
}
|