docs: fixes env variable name in next.js docs (#4665)
the SEARCH_INDEX_NAME variable should equal to process.env.NEXT_PUBLIC_SEARCH_API_KEY (as in the .env file) instead of NEXT_PUBLIC_INDEX_NAME. Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
This commit is contained in:
co-authored by
Shahed Nasser
parent
84fe2a3837
commit
7f1421c218
@@ -274,7 +274,7 @@ const apiKey =
|
||||
export const searchClient = algoliasearch(appId, apiKey)
|
||||
|
||||
export const SEARCH_INDEX_NAME =
|
||||
process.env.NEXT_PUBLIC_INDEX_NAME || "products"
|
||||
process.env.NEXT_PUBLIC_SEARCH_INDEX_NAME || "products"
|
||||
```
|
||||
|
||||
If you run your Next.js Starter Template now while the Medusa backend is running, the search functionality will be available in your storefront.
|
||||
|
||||
Reference in New Issue
Block a user