File tree Expand file tree Collapse file tree
apps/site/components/Common/Searchbox Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,10 +27,13 @@ import styles from './index.module.css';
2727import { Search } from './Search' ;
2828import { SlidingChatPanel } from './SlidingChatPanel' ;
2929
30- const orama = new OramaCloud ( {
31- projectId : ORAMA_CLOUD_PROJECT_ID ,
32- apiKey : ORAMA_CLOUD_READ_API_KEY ,
33- } ) ;
30+ const orama =
31+ ORAMA_CLOUD_PROJECT_ID && ORAMA_CLOUD_READ_API_KEY
32+ ? new OramaCloud ( {
33+ projectId : ORAMA_CLOUD_PROJECT_ID ,
34+ apiKey : ORAMA_CLOUD_READ_API_KEY ,
35+ } )
36+ : null ;
3437
3538const MobileTopBar : FC < {
3639 isChatOpen : boolean ;
@@ -205,6 +208,7 @@ const SearchWithModal: FC = () => {
205208 < button
206209 type = "button"
207210 onClick = { toggleSearchBox }
211+ disabled = { ! orama }
208212 className = { styles . searchButton }
209213 >
210214 < div className = { styles . searchButtonContent } >
You can’t perform that action at this time.
0 commit comments