1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

link version numbers to release pages

This commit is contained in:
Matthias Kretschmann 2019-06-14 12:31:29 +02:00
parent 46e6d89057
commit 6f7edfa30f
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 41 additions and 10 deletions

View File

@ -40,6 +40,34 @@ const VersionTableContracts = ({
</table>
)
const VersionNumber = ({
isLoading,
software,
version,
network
}: {
isLoading: boolean
software: string
version: string
network: string
}) =>
isLoading ? (
<Spinner small className={styles.spinner} />
) : version ? (
<>
<a
href={`https://github.com/oceanprotocol/${slugify(
software
)}/releases/tag/v${version}`}
>
<code>v{version}</code>
</a>
{network && `(${network})`}
</>
) : (
<span>Could not get version</span>
)
const VersionTable = ({ data }: { data: VersionTableProps }) => (
<div className={styles.tableWrap}>
<table className={styles.table}>
@ -60,16 +88,12 @@ const VersionTable = ({ data }: { data: VersionTableProps }) => (
</a>
</td>
<td>
{value.isLoading ? (
<Spinner small className={styles.spinner} />
) : value.version ? (
<>
<code>v{value.version}</code>
{value.network && `(${value.network})`}
</>
) : (
'Could not get version'
)}
<VersionNumber
isLoading={value.isLoading}
software={value.software}
version={value.version}
network={value.network}
/>
</td>
</tr>
{key === 'keeperContracts' && data.brizo.contracts && (

View File

@ -25,6 +25,13 @@
overflow-wrap: break-word;
display: inline;
}
a:hover,
a:focus {
code {
color: inherit;
}
}
}
.error {