Make entire CommitButton clickable

Instead of having the Link component inside the Button component, we
should do it the other way around, that way the entire Button is
clickable and links somewhere.
This commit is contained in:
Sebastian Martinez
2024-05-06 12:23:24 +02:00
committed by Rūdolfs Ošiņš
parent f50521ca23
commit 230243e772
@@ -26,24 +26,24 @@
}
</style>
<Button
title="Current HEAD"
variant="not-selected"
styleBorderRadius={styleRoundBorders
? "var(--border-radius-tiny)"
: "0 var(--border-radius-tiny) var(--border-radius-tiny) 0"}>
<Link
route={{
resource: "project.commit",
project: projectId,
node: baseUrl,
commit: commit.id,
}}>
<Link
route={{
resource: "project.commit",
project: projectId,
node: baseUrl,
commit: commit.id,
}}>
<Button
title="Current HEAD"
variant="not-selected"
styleBorderRadius={styleRoundBorders
? "var(--border-radius-tiny)"
: "0 var(--border-radius-tiny) var(--border-radius-tiny) 0"}>
<div class="commit">
<div class="identifier global-commit">
{commitShortId}
</div>
<span>{commit.summary}</span>
</div>
</Link>
</Button>
</Button>
</Link>