@@ -13,20 +13,16 @@ import {
13
13
useNavigate ,
14
14
useParams ,
15
15
} from '@tanstack/react-router'
16
- import { OramaSearchBox } from '@orama/react-components'
17
- import { Carbon } from '~/components/Carbon'
18
16
import { Select } from '~/components/Select'
19
17
import { useLocalStorage } from '~/utils/useLocalStorage'
20
18
import { DocsLogo } from '~/components/DocsLogo'
21
19
import { last , capitalize } from '~/utils/utils'
22
20
import type { SelectOption } from '~/components/Select'
23
21
import type { ConfigSchema , MenuItem } from '~/utils/config'
24
22
import { create } from 'zustand'
25
- import { searchBoxParams , searchButtonParams } from '~/components/Orama'
26
23
import { Framework , getFrameworkOptions } from '~/libraries'
27
24
import { DocsCalloutQueryGG } from '~/components/DocsCalloutQueryGG'
28
25
import { DocsCalloutBytes } from '~/components/DocsCalloutBytes'
29
- import { ClientOnlySearchButton } from './ClientOnlySearchButton'
30
26
import { twMerge } from 'tailwind-merge'
31
27
import { partners } from '~/utils/partners'
32
28
import { useThemeStore } from './ThemeToggle'
@@ -35,7 +31,7 @@ import {
35
31
GadLeftRailSquare ,
36
32
GadRightRailSquare ,
37
33
} from './GoogleScripts'
38
- import { DocContainer } from './DocContainer '
34
+ import { SearchButton } from './SearchButton '
39
35
40
36
// Let's use zustand to wrap the local storage logic. This way
41
37
// we'll get subscriptions for free and we can use it in other
@@ -306,7 +302,6 @@ type DocsLayoutProps = {
306
302
frameworks : Framework [ ]
307
303
versions : string [ ]
308
304
repo : string
309
- stableRandoms : number [ ]
310
305
children : React . ReactNode
311
306
}
312
307
@@ -330,10 +325,6 @@ export function DocsLayout({
330
325
const versionConfig = useVersionConfig ( { versions } )
331
326
const menuConfig = useMenuConfig ( { config, frameworks, repo } )
332
327
333
- const { mode : themeMode } = useThemeStore ( )
334
-
335
- const oramaThemeMode = themeMode === 'auto' ? 'system' : themeMode
336
-
337
328
const matches = useMatches ( )
338
329
const lastMatch = last ( matches )
339
330
@@ -510,12 +501,7 @@ export function DocsLayout({
510
501
onSelect = { versionConfig . onSelect }
511
502
/>
512
503
</ div >
513
- < ClientOnlySearchButton
514
- { ...searchButtonParams }
515
- colorScheme = { oramaThemeMode }
516
- >
517
- Search
518
- </ ClientOnlySearchButton >
504
+ < SearchButton />
519
505
{ menuItems }
520
506
</ div >
521
507
</ details >
@@ -533,7 +519,7 @@ export function DocsLayout({
533
519
{ logo }
534
520
</ div >
535
521
< div className = "px-4" >
536
- < ClientOnlySearchButton { ... searchButtonParams } />
522
+ < SearchButton />
537
523
</ div >
538
524
< div className = "flex gap-2 px-4" >
539
525
< Select
@@ -561,23 +547,6 @@ export function DocsLayout({
561
547
< div
562
548
className = { `min-h-screen flex flex-col lg:flex-row w-full transition-all duration-300` }
563
549
>
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 >
581
550
{ smallMenu }
582
551
{ largeMenu }
583
552
< div className = "flex flex-col max-w-full min-w-0 w-full min-h-0 relative" >
0 commit comments