Skip to content

Commit 2a327ec

Browse files
committed
fix: logo url in detail page
1 parent baa506c commit 2a327ec

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

web/src/ui/pages/softwareDetails/SoftwareDetails.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ export default function SoftwareDetails(props: Props) {
5656
return <LoadingFallback />;
5757
}
5858

59+
const getLogoUrl = (): string | undefined => {
60+
if (software.logoUrl) return software.logoUrl;
61+
if (uiConfig?.softwareDetails.defaultLogo) return softwareLogoPlaceholder;
62+
};
63+
5964
return (
6065
<>
6166
<div className={className}>
@@ -76,11 +81,7 @@ export default function SoftwareDetails(props: Props) {
7681
className={classes.breadcrumb}
7782
/>
7883
<HeaderDetailCard
79-
softwareLogoUrl={
80-
(software?.logoUrl ?? uiConfig?.softwareDetails.defaultLogo)
81-
? softwareLogoPlaceholder
82-
: undefined
83-
}
84+
softwareLogoUrl={getLogoUrl()}
8485
softwareName={software.softwareName}
8586
softwareDereferencing={software.dereferencing}
8687
authors={software.authors}

0 commit comments

Comments
 (0)