import * as React from "react"; import { Link } from "../../link"; import { EmptyStateWrapper, EmptyStateGraphic } from "../../ui/empty_state_wrapper"; import { Content } from "../../constants"; import { t } from "../../i18next_wrapper"; import { ExternalUrl } from "../../external_urls"; /** A stripped down version of OFSearchResult */ interface Result { crop: { slug: string; name: string; }; image: string; } export interface SearchResultProps { cropSearchResults: Result[]; cropSearchInProgress: boolean; } export class OpenFarmResults extends React.Component { get text(): JSX.Element { return

{`${t(Content.CROP_NOT_FOUND_INTRO)} `} {t(Content.CROP_NOT_FOUND_LINK)}

; } render() { return
0} graphic={EmptyStateGraphic.no_crop_results} title={this.props.cropSearchInProgress ? t("Searching...") : t("No search results")} textElement={this.props.cropSearchInProgress ?
: this.text} colorScheme={"plants"}> {this.props.cropSearchResults.map(resp => { const { crop, image } = resp; return
; })}
; } }