Skip to content

Commit

Permalink
fix(clerk-js): Missing or broken breadcrumbs (#1722)
Browse files Browse the repository at this point in the history
* fix(clerk-js): Missing or broken breadcrumbs

* chore(clerk-js): Add changeset
  • Loading branch information
panteliselef authored Sep 14, 2023
1 parent 634948f commit 7fa9364
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/silly-numbers-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Fix bug with missing or incorrect breadcrumbs in Organization and User profiles
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ const ActionConfirmationPage = withCardStateProvider((props: ActionConfirmationP
<Wizard {...wizard.props}>
<ContentPage
headerTitle={title}
breadcrumbTitle={localizationKeys('organizationProfile.profilePage.dangerSection.title')}
Breadcrumbs={OrganizationProfileBreadcrumbs}
>
<Form.Root onSubmit={handleSubmit}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const pageToRootNavbarRouteMap = {
domain: organizationProfileRoutes.find(r => r.id === 'settings'),
profile: organizationProfileRoutes.find(r => r.id === 'settings'),
leave: organizationProfileRoutes.find(r => r.id === 'settings'),
delete: organizationProfileRoutes.find(r => r.id === 'settings'),
};

export const OrganizationProfileBreadcrumbs = (props: Pick<PropsOfComponent<typeof Breadcrumbs>, 'title'>) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ const AddConnectedAccount = () => {
};

return (
<ContentPage headerTitle={localizationKeys('userProfile.connectedAccountPage.title')}>
<ContentPage
headerTitle={localizationKeys('userProfile.connectedAccountPage.title')}
Breadcrumbs={UserProfileBreadcrumbs}
>
<Text
localizationKey={
unconnectedStrategies.length
Expand Down
10 changes: 8 additions & 2 deletions packages/clerk-js/src/ui/components/UserProfile/EmailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ export const EmailPage = withCardStateProvider(() => {

return (
<Wizard {...wizard.props}>
<ContentPage headerTitle={title}>
<ContentPage
headerTitle={title}
Breadcrumbs={UserProfileBreadcrumbs}
>
<Form.Root onSubmit={addEmail}>
<Form.ControlRow elementId={emailField.id}>
<Form.Control
Expand All @@ -71,7 +74,10 @@ export const EmailPage = withCardStateProvider(() => {
</Form.Root>
</ContentPage>

<ContentPage headerTitle={title}>
<ContentPage
headerTitle={title}
Breadcrumbs={UserProfileBreadcrumbs}
>
{preferMagicLinks ? (
<VerifyWithLink
nextStep={wizard.nextStep}
Expand Down

0 comments on commit 7fa9364

Please sign in to comment.