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>
|
</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 && (
|
||||||
|
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user