Skip to content

Commit

Permalink
feat: add to-detail-page breadcrumb
Browse files Browse the repository at this point in the history
  • Loading branch information
pooriamehregan committed Oct 23, 2023
1 parent e4e8c81 commit bf3ab4e
Show file tree
Hide file tree
Showing 3 changed files with 171 additions and 1 deletion.
152 changes: 152 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 18 additions & 1 deletion src/components/breadcrumbs/breadcrumbs.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,24 @@ const PureBreadcrumbs = ({ breadcrumbs }) => {
<i className='fa fa-angle-right mx-3' />
</>
)}
{index === breadcrumbs.length - 1 && breadcrumb.breadcrumb}
{index === breadcrumbs.length - 1 &&
(breadcrumb.match.params.conceptId ? (
<>
<a
href={`${config.conceptCatalogFrontendBaseUri}//${breadcrumb.match.params.catalogId}/${breadcrumb.match.params.conceptId}`}
>
{breadcrumb.breadcrumb}
</a>
<i className='fa fa-angle-right mx-3' />
<span>
{breadcrumb.match.params.conceptId === 'new'
? localization.new
: localization.edit}
</span>
</>
) : (
breadcrumb.breadcrumb
))}
</span>
))}
</SC.BreadcrumbsPath>
Expand Down
1 change: 1 addition & 0 deletions src/l10n/nb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,5 @@ export const nb = {
searchCode: 'Søk etter kode',
hasPreexistingValue: 'Det finnes allerede en verdi i feltet for {0}, "{1}".',
chooseNewFromList: 'Velg ny verdi fra listen nedenfor.',
edit: 'Rediger',
};

0 comments on commit bf3ab4e

Please sign in to comment.