@@ -13,20 +13,16 @@ import {
1313 useNavigate ,
1414 useParams ,
1515} from '@tanstack/react-router'
16- import { OramaSearchBox } from '@orama/react-components'
17- import { Carbon } from '~/components/Carbon'
1816import { Select } from '~/components/Select'
1917import { useLocalStorage } from '~/utils/useLocalStorage'
2018import { DocsLogo } from '~/components/DocsLogo'
2119import { last , capitalize } from '~/utils/utils'
2220import type { SelectOption } from '~/components/Select'
2321import type { ConfigSchema , MenuItem } from '~/utils/config'
2422import { create } from 'zustand'
25- import { searchBoxParams , searchButtonParams } from '~/components/Orama'
2623import { Framework , getFrameworkOptions } from '~/libraries'
2724import { DocsCalloutQueryGG } from '~/components/DocsCalloutQueryGG'
2825import { DocsCalloutBytes } from '~/components/DocsCalloutBytes'
29- import { ClientOnlySearchButton } from './ClientOnlySearchButton'
3026import { twMerge } from 'tailwind-merge'
3127import { partners } from '~/utils/partners'
3228import { useThemeStore } from './ThemeToggle'
@@ -35,7 +31,7 @@ import {
3531 GadLeftRailSquare ,
3632 GadRightRailSquare ,
3733} from './GoogleScripts'
38- import { DocContainer } from './DocContainer '
34+ import { SearchButton } from './SearchButton '
3935
4036// Let's use zustand to wrap the local storage logic. This way
4137// we'll get subscriptions for free and we can use it in other
@@ -306,7 +302,6 @@ type DocsLayoutProps = {
306302 frameworks : Framework [ ]
307303 versions : string [ ]
308304 repo : string
309- stableRandoms : number [ ]
310305 children : React . ReactNode
311306}
312307
@@ -330,10 +325,6 @@ export function DocsLayout({
330325 const versionConfig = useVersionConfig ( { versions } )
331326 const menuConfig = useMenuConfig ( { config, frameworks, repo } )
332327
333- const { mode : themeMode } = useThemeStore ( )
334-
335- const oramaThemeMode = themeMode === 'auto' ? 'system' : themeMode
336-
337328 const matches = useMatches ( )
338329 const lastMatch = last ( matches )
339330
@@ -510,12 +501,7 @@ export function DocsLayout({
510501 onSelect = { versionConfig . onSelect }
511502 />
512503 </ div >
513- < ClientOnlySearchButton
514- { ...searchButtonParams }
515- colorScheme = { oramaThemeMode }
516- >
517- Search
518- </ ClientOnlySearchButton >
504+ < SearchButton />
519505 { menuItems }
520506 </ div >
521507 </ details >
@@ -533,7 +519,7 @@ export function DocsLayout({
533519 { logo }
534520 </ div >
535521 < div className = "px-4" >
536- < ClientOnlySearchButton { ... searchButtonParams } />
522+ < SearchButton />
537523 </ div >
538524 < div className = "flex gap-2 px-4" >
539525 < Select
@@ -561,23 +547,6 @@ export function DocsLayout({
561547 < div
562548 className = { `min-h-screen flex flex-col lg:flex-row w-full transition-all duration-300` }
563549 >
564- < div className = "fixed z-50" >
565- { mounted && (
566- < OramaSearchBox
567- { ...searchBoxParams }
568- searchParams = { {
569- threshold : 0 ,
570- where : {
571- category : {
572- eq : capitalize ( libraryId ! ) as string ,
573- } ,
574- } as any ,
575- } }
576- facetProperty = { undefined }
577- colorScheme = { oramaThemeMode }
578- />
579- ) }
580- </ div >
581550 { smallMenu }
582551 { largeMenu }
583552 < div className = "flex flex-col max-w-full min-w-0 w-full min-h-0 relative" >
0 commit comments