()
| 731 | } |
| 732 | |
| 733 | export function createSearchOptions< |
| 734 | T extends {name: string; tags: string[]; date?: string; section?: string} |
| 735 | >() { |
| 736 | return { |
| 737 | getName: (item: T) => item.name, |
| 738 | getTags: (item: T) => item.tags, |
| 739 | getDate: (item: T) => item.date, |
| 740 | shouldUseDateSort: (item: T) => { |
| 741 | const section = item.section; |
| 742 | return section === 'Blog' || section === 'Releases'; |
| 743 | } |
| 744 | }; |
| 745 | } |
| 746 | |
| 747 | export function SearchEmptyState({ |
| 748 | searchValue, |
no outgoing calls
no test coverage detected