-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Upgrade @fern-fern/registry-browser * Add ALGOLIA_SEARCH_INDEX to env vars * Implement getEnvConfig() * Implement new useSearchService() * Include version info in SearchDialog input placeholder * Try to retrieve index from docs def if not present on search info * Update mock docs definition * Add docsDefinition.algoliaSearchIndex to useMemo deps * Handle the case where search info is not sent * Remove version from navigateToPath slug argument in SearchHit * Move validation of `algoliaSearchIndex` env var to useSearchService * Upgrade @fern-fern/registry-browser * Update SearchHit onClick handler to use search hit version slug
- Loading branch information
Showing
14 changed files
with
136 additions
and
41 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file renamed
BIN
+350 KB
...17.0-8-g5dfc5af-f827bf56ef-ad2f8a60dd.zip → ...9.1-10-gf615da5-50892051e6-26d1077db2.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
type EnvironmentConfig = { | ||
algoliaAppId: string; | ||
/** | ||
* This is used by the legacy search system. | ||
*/ | ||
algoliaApiKey: string; | ||
|
||
algoliaSearchIndex?: string; | ||
}; | ||
|
||
export function getEnvConfig(): EnvironmentConfig { | ||
if (process.env.NEXT_PUBLIC_ALGOLIA_APP_ID == null) { | ||
throw new Error('Missing environment variable "NEXT_PUBLIC_ALGOLIA_APP_ID"'); | ||
} | ||
|
||
if (process.env.NEXT_PUBLIC_ALGOLIA_API_KEY == null) { | ||
throw new Error('Missing environment variable "NEXT_PUBLIC_ALGOLIA_API_KEY"'); | ||
} | ||
|
||
return { | ||
algoliaAppId: process.env.NEXT_PUBLIC_ALGOLIA_APP_ID, | ||
algoliaApiKey: process.env.NEXT_PUBLIC_ALGOLIA_API_KEY, | ||
algoliaSearchIndex: process.env.NEXT_PUBLIC_ALGOLIA_SEARCH_INDEX, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c980669
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
fern-dev – ./packages/ui/fe-bundle
app-dev.buildwithfern.com
fern-dev-buildwithfern.vercel.app
devtest.buildwithfern.com
fern-dev-git-main-buildwithfern.vercel.app