@@ -35,8 +35,8 @@ type OramaDocument = {
3535} ;
3636
3737const client = getOramaClient ( {
38- projectId : import . meta . env . ORAMA_PROJECT_ID ?? null ,
39- apiKey : import . meta . env . ORAMA_PUBLIC_API_KEY ?? null ,
38+ projectId : process . env . ORAMA_PROJECT_ID ?? null ,
39+ apiKey : process . env . ORAMA_PUBLIC_API_KEY ?? null ,
4040} ) ;
4141
4242export function Search ( ) {
@@ -72,21 +72,21 @@ export function Search() {
7272 ( groupedHits , hit ) => {
7373 const section = hit . document . section . replace (
7474 / ( ^ | - ) ( [ a - z ] ) / g,
75- ( _ , sep , letter ) => sep + letter . toUpperCase ( ) ,
75+ ( _ , sep , letter ) => sep + letter . toUpperCase ( )
7676 ) ;
7777 if ( ! groupedHits [ section ] ) {
7878 groupedHits [ section ] = [ ] ;
7979 }
8080 groupedHits [ section ] . push ( hit ) ;
8181 return groupedHits ;
8282 } ,
83- { } as Record < string , SearchResult < OramaDocument > [ "hits" ] > ,
83+ { } as Record < string , SearchResult < OramaDocument > [ "hits" ] >
8484 ) ;
8585 setActive ( 0 ) ;
8686 setResultRefs ( [ ] ) ;
8787 return groupedHits ;
8888 } ,
89- { initialValue : { } } ,
89+ { initialValue : { } }
9090 ) ;
9191
9292 const resultArray = ( ) => Object . values ( result ( ) ) . flatMap ( ( hits ) => hits ) ;
@@ -189,7 +189,7 @@ export function Search() {
189189 class = "w-full rounded border border-blue-100 bg-white px-9 py-2 ring-2 ring-blue-400 focus:outline-none focus-visible:border focus-visible:border-blue-400 focus-visible:ring-2 dark:bg-slate-800"
190190 onInput = { ( e ) =>
191191 startTransition ( ( ) =>
192- setSearchTerm ( ( e . target as HTMLInputElement ) . value ) ,
192+ setSearchTerm ( ( e . target as HTMLInputElement ) . value )
193193 )
194194 }
195195 onFocus = { ( ) => setActive ( 0 ) }
@@ -283,7 +283,7 @@ export function Search() {
283283 < span class = "block truncate text-black/70 dark:text-white/70" >
284284 { highlightContent (
285285 trimContent ( hit . document . content ) ,
286- regex ( ) ,
286+ regex ( )
287287 ) }
288288 </ span >
289289 </ Dialog . CloseButton >
0 commit comments