Skip to content

Commit

Permalink
frontend: Hide back button with null backLink
Browse files Browse the repository at this point in the history
This fix explicitly handles the null case in getBackLink() to ensure
that no back button will be shown, as defined in MainInfoSectionProps.

Fixes: #2033

Signed-off-by: Evangelos Skopelitis <eskopelitis@microsoft.com>
  • Loading branch information
skoeva committed Jun 14, 2024
1 parent a11f9f0 commit 2f5c3db
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ export function MainInfoSection(props: MainInfoSectionProps) {
const header = typeof headerSection === 'function' ? headerSection(resource) : headerSection;

function getBackLink() {
if (backLink === null) {
return false;
}

if (!!backLink || backLink === '') {
return backLink;
}
Expand Down

0 comments on commit 2f5c3db

Please sign in to comment.