Fix brand logo link for dashboards deployed on a sub-url

When the zuul dashboard is deployed on a sub-url, the link on the Zuul
logo did not take the basepath into account.

Fix this by using a Link component instead of a simple <a href...> as
the <a> tag is not aware of any react-router configuration.

Change-Id: Id856d75e88b7731c8326b84619ceaf51a3275426
This commit is contained in:
Felix Edel 2020-07-14 10:07:39 +02:00
parent 18e55acb61
commit 4c99dd353f
No known key found for this signature in database
GPG Key ID: E95717A102DD3030
1 changed files with 4 additions and 1 deletions

View File

@ -390,10 +390,13 @@ class App extends React.Component {
</PageHeaderTools>
)
// In case we don't have an active tenant, fall back to the root URL
const logoUrl = tenant.name ? tenant.defaultRoute : '/'
const pageHeader = (
<PageHeader
logo={<Brand src={logo} alt='Zuul logo' className="zuul-brand" />}
logoProps={{href: tenant.defaultRoute}}
logoProps={{to: logoUrl}}
logoComponent={Link}
headerTools={pageHeaderTools}
topNav={nav}
/>