-
Notifications
You must be signed in to change notification settings - Fork 43
[WEB-4489] chore: disable personal keys on examples #2731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
e76ba0e
to
376bd47
Compare
376bd47
to
876d89e
Compare
876d89e
to
8c8635f
Compare
8c8635f
to
5da9931
Compare
5da9931
to
ce8b1d3
Compare
This pull request refactors the handling of API keys in the
examples
page template and removes unused code related to user context and API key retrieval. The changes simplify the codebase by replacing dynamic API key logic with a static environment variable and removing unnecessary imports and functions.Review app (it's a random website dependabot env, but it points to the right docs - log in as normal): https://website-dependabot-npm--7ueyw3.herokuapp.com/examples
Acceptance: it should work and say it's using the demo key in the Sandpack window footer
Refactoring API key handling:
UserContext
andgetApiKey
with a static demo key sourced from theGATSBY_VITE_ABLY_KEY
environment variable insrc/templates/examples.tsx
. This is a temporary solution until a better approach is implemented.Code cleanup:
UserContext
import and thegetApiKey
function fromsrc/templates/examples.tsx
.getApiKey
function and its related import fromsrc/utilities/update-ably-connection-keys.ts
, as it is no longer used.useContext
import fromsrc/templates/examples.tsx
.