blob: 1e7afe1072e95bcf006bce0fe94927186e9879b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
import { FC } from 'react';
import { useIntl } from 'react-intl';
import { SearchForm, type SearchFormProps } from '../forms';
export type NoResultsProps = Pick<SearchFormProps, 'searchPage'>;
/**
* NoResults component
*
* Renders a no results text with a search form.
*/
export const NoResults: FC<NoResultsProps> = ({ searchPage }) => {
const intl = useIntl();
return (
<>
<p>
{intl.formatMessage({
defaultMessage: 'No results found.',
description: 'NoResults: no results',
id: '5O2vpy',
})}
</p>
<p>
{intl.formatMessage({
defaultMessage: 'Would you like to try a new search?',
description: 'NoResults: try a new search message',
id: 'DVBwfu',
})}
</p>
<SearchForm hideLabel={true} searchPage={searchPage} />
</>
);
};
|