If application has no URL, render text only (#25138)

Fixes #25124

Signed-off-by: Stan Silvert <ssilvert@redhat.com>
This commit is contained in:
Stan Silvert 2023-11-30 14:05:06 -05:00 committed by GitHub
parent 386e4ea8d4
commit 8a9b83d016
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -128,15 +128,22 @@ const Applications = () => {
className="pf-u-align-items-center" className="pf-u-align-items-center"
dataListCells={[ dataListCells={[
<DataListCell width={2} key={`client${application.clientId}`}> <DataListCell width={2} key={`client${application.clientId}`}>
<Button {application.effectiveUrl && (
className="pf-u-pl-0 title-case" <Button
component="a" className="pf-u-pl-0 title-case"
variant="link" component="a"
onClick={() => window.open(application.effectiveUrl)} variant="link"
> onClick={() => window.open(application.effectiveUrl)}
{application.clientName || application.clientId}{" "} >
<ExternalLinkAltIcon /> {application.clientName || application.clientId}{" "}
</Button> <ExternalLinkAltIcon />
</Button>
)}
{!application.effectiveUrl && (
<span>
{application.clientName || application.clientId}
</span>
)}
</DataListCell>, </DataListCell>,
<DataListCell <DataListCell
width={2} width={2}