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> </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 }) => ( const VersionTable = ({ data }: { data: VersionTableProps }) => (
<div className={styles.tableWrap}> <div className={styles.tableWrap}>
<table className={styles.table}> <table className={styles.table}>
@ -60,16 +88,12 @@ const VersionTable = ({ data }: { data: VersionTableProps }) => (
</a> </a>
</td> </td>
<td> <td>
{value.isLoading ? ( <VersionNumber
<Spinner small className={styles.spinner} /> isLoading={value.isLoading}
) : value.version ? ( software={value.software}
<> version={value.version}
<code>v{value.version}</code> network={value.network}
{value.network && `(${value.network})`} />
</>
) : (
'Could not get version'
)}
</td> </td>
</tr> </tr>
{key === 'keeperContracts' && data.brizo.contracts && ( {key === 'keeperContracts' && data.brizo.contracts && (

View File

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