michael-s-molina commented on code in PR #41119:
URL: https://github.com/apache/superset/pull/41119#discussion_r3427841513


##########
superset-frontend/src/features/home/Menu.tsx:
##########
@@ -292,16 +292,24 @@ export function Menu({
   const renderBrand = () => {
     let link;
     if (theme.brandLogoUrl) {
+      const brandHref = ensureAppRoot(theme.brandLogoHref);
+      const brandImage = (
+        <StyledImage
+          preview={false}
+          src={ensureStaticPrefix(theme.brandLogoUrl)}
+          alt={theme.brandLogoAlt || 'Apache Superset'}
+          height={theme.brandLogoHeight}
+        />
+      );
       link = (
         <StyledBrandWrapper margin={theme.brandLogoMargin}>
-          <StyledBrandLink href={ensureAppRoot(theme.brandLogoHref)}>
-            <StyledImage
-              preview={false}
-              src={ensureStaticPrefix(theme.brandLogoUrl)}
-              alt={theme.brandLogoAlt || 'Apache Superset'}
-              height={theme.brandLogoHeight}
-            />
-          </StyledBrandLink>
+          {isUrlExternal(brandHref) || !isFrontendRoute(brandHref) ? (
+            <Typography.Link className="navbar-brand" href={brandHref}>
+              {brandImage}
+            </Typography.Link>
+          ) : (
+            <StyledBrandLink to={brandHref}>{brandImage}</StyledBrandLink>
+          )}

Review Comment:
   Outdated comment



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to