Skip to content

fix(cc-token-api-*): pass API bridge URL as a prop instead of hardcoding it#1715

Open
Galimede wants to merge 1 commit intomasterfrom
cc-token-api-update-form/add-api-bridge-prop
Open

fix(cc-token-api-*): pass API bridge URL as a prop instead of hardcoding it#1715
Galimede wants to merge 1 commit intomasterfrom
cc-token-api-update-form/add-api-bridge-prop

Conversation

@Galimede
Copy link
Copy Markdown
Member

@Galimede Galimede commented Apr 3, 2026

Fixes #1714

What does this PR do?

  • Adds an apiBridgeHref prop to cc-token-api-update-form, cc-token-api-list, and cc-token-api-creation-form,
  • Replaces the hardcoded https://api-bridge.clever-cloud.com in the curl example with the prop value,
  • Uses new URL() to safely join the path (handles trailing slashes),
  • Smart components pass apiConfig.AUTH_BRIDGE_HOST to the new prop,
  • Defaults to https://api-bridge.clever-cloud.com when the prop is not set.

How to review?

  • Check the code,
  • Check the withCustomApiBridgeHref story in Storybook for each component,
  • Two reviewers should be enough.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

🔎 A preview has been automatically published : https://clever-components-preview.cellar-c2.services.clever-cloud.com/cc-token-api-update-form/add-api-bridge-prop/index.html.

This preview will be deleted once this PR is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cc-token-api-*: API base URL should be passed as a prop

1 participant