(apiKey: string)
| 23 | ); |
| 24 | |
| 25 | export const searchClient = (apiKey: string) => { |
| 26 | typesenseInstantsearchAdapter.updateConfiguration({ |
| 27 | ...defaultConfiguration, |
| 28 | server: { |
| 29 | ...defaultConfiguration.server, |
| 30 | apiKey, |
| 31 | }, |
| 32 | }); |
| 33 | return typesenseInstantsearchAdapter.searchClient; |
| 34 | }; |
| 35 | |
| 36 | function isProd() { |
| 37 | return process.env.NODE_ENV === 'production'; |