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:
parent
46e6d89057
commit
6f7edfa30f
@ -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 && (
|
||||
|
@ -25,6 +25,13 @@
|
||||
overflow-wrap: break-word;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a:focus {
|
||||
code {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.error {
|
||||
|
Loading…
Reference in New Issue
Block a user