Skip to content

Commit

Permalink
add changelog link to version
Browse files Browse the repository at this point in the history
  • Loading branch information
benphelps committed Oct 17, 2022
1 parent 8dc8b2d commit 4ec8fc1
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/components/version.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,23 @@ export default function Version() {
return (
<div className="flex flex-row items-center">
<span className="text-xs text-theme-500 dark:text-theme-400">
{version} ({revision.substring(0, 7)}, {formatDate(buildTime)})
{version === "main" || version === "dev" || version === "nightly" ? (
<>
{version} ({revision.substring(0, 7)}, {formatDate(buildTime)})
</>
) : (
releaseData &&
compareVersions(latestRelease.tag_name, version) > 0 && (
<a
href={`https://github.com/benphelps/homepage/releases/tag/${version}`}
target="_blank"
rel="noopener noreferrer"
className="ml-2 text-xs text-theme-500 dark:text-theme-400 flex flex-row items-center"
>
{version} ({revision.substring(0, 7)}, {formatDate(buildTime)})
</a>
)
)}
</span>
{version === "main" || version === "dev" || version === "nightly"
? null
Expand Down

0 comments on commit 4ec8fc1

Please sign in to comment.