docs: disable ai search for now (#2740)

### Change Type

- [x] `documentation` — Changes to the documentation only[^2]

### Release Notes

- Docs: disable AI search for now.
pull/2748/head
Mime Čuvalo 2024-02-06 11:50:11 +00:00 zatwierdzone przez GitHub
rodzic d47152d864
commit 51f9e630ac
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 7 dodań i 5 usunięć

Wyświetl plik

@ -70,6 +70,8 @@ export function Search() {
router.push(url.startsWith('/') ? url : `/${url}`)
}
// AI is turned off for now.
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const handleSearchTypeChange = () => {
setSearchResults([])
setSearchType(searchType === SEARCH_TYPE.AI ? SEARCH_TYPE.NORMAL : SEARCH_TYPE.AI)
@ -95,11 +97,11 @@ export function Search() {
<div className="search__wrapper">
<Autocomplete
ref={rInput}
customUI={
<button className="search__ai-toggle" onClick={handleSearchTypeChange}>
{searchType === SEARCH_TYPE.NORMAL ? '✨ Search using AI' : '⭐ Search without AI'}
</button>
}
// customUI={
// <button className="search__ai-toggle" onClick={handleSearchTypeChange}>
// {searchType === SEARCH_TYPE.NORMAL ? '✨ Search using AI' : '⭐ Search without AI'}
// </button>
// }
groups={['examples', 'docs', 'reference']}
groupsToLabel={{ examples: 'Examples', docs: 'Articles', reference: 'Reference' }}
options={searchResults}