Skip to content

Commit 42d308a

Browse files
committed
Fix rendering of a "dead" link
Signed-off-by: Nikola Forró <[email protected]>
1 parent 54da585 commit 42d308a

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

frontend/src/app/Results/ResultsPageCoprDetails.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ export interface ResultsPageCoprDetailsProps {
2424
export const ResultsPageCoprDetails: React.FC<ResultsPageCoprDetailsProps> = ({
2525
data,
2626
}) => {
27+
const buildLogsLink = data.build_logs_url ? (
28+
<a href={data.build_logs_url} rel="noreferrer" target={"_blank"}>
29+
Logs
30+
</a>
31+
) : (
32+
"Logs not available"
33+
);
34+
2735
return (
2836
<DescriptionList
2937
columnModifier={{
@@ -45,11 +53,7 @@ export const ResultsPageCoprDetails: React.FC<ResultsPageCoprDetailsProps> = ({
4553
status={data.status}
4654
link={data.web_url}
4755
/>
48-
(
49-
<a href={data.build_logs_url} rel="noreferrer" target={"_blank"}>
50-
Logs
51-
</a>
52-
)
56+
({buildLogsLink})
5357
</DescriptionListDescription>
5458
</DescriptionListGroup>
5559
<DescriptionListGroup>

0 commit comments

Comments
 (0)