making sure algolia errors if don't have env variables as we need it

This commit is contained in:
talksik
2022-02-02 00:24:07 -08:00
parent 22d4536200
commit 2ee36e4963
2 changed files with 17 additions and 13 deletions
@@ -12,6 +12,8 @@ this conversation had something going on (new link, new room, new clip...) AND
other users just subscribe to this published source // -> users - A -> last
interaction date // -> audioClips - c // -> links // -> live }
- also be able to see very cleraly who the last speaker was in the conversation
# Listeners
### A - listener for all - users within conversation documents
@@ -45,3 +47,14 @@ all conversations in the conversation map and place in right category /\*\*
- } \*/
//
# Dashboard
### Data Needed
- live conversations going on right now and which people are in them
- all inbox-like conversations such as today, last 7 days, etc
a. being able to play the last message in the conversation with a play button
b. see if there is a new update in the conversation which I have not viewed
- priority conversations
a. need to be able to play any messages from there
+4 -13
View File
@@ -1,20 +1,11 @@
import algoliaSearch, { SearchClient } from "algoliasearch";
var searchClient: SearchClient = null;
if (
process.env.NEXT_PUBLIC_ALGOLIA_APP_ID &&
const searchClient: SearchClient = algoliaSearch(
process.env.NEXT_PUBLIC_ALGOLIA_APP_ID,
process.env.NEXT_PUBLIC_ALGOLIA_API_KEY
) {
searchClient = algoliaSearch(
process.env.NEXT_PUBLIC_ALGOLIA_APP_ID,
process.env.NEXT_PUBLIC_ALGOLIA_API_KEY
);
);
console.log("set up algolia search successfully");
} else {
console.error("unable to set up aloglia");
}
console.log("set up algolia search successfully");
export const usersIndex = searchClient.initIndex(
process.env.NEXT_PUBLIC_ALGOLIA_USERS_INDEX_NAME || ""