1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00
market/src/components/atoms/BuildId.tsx
Matthias Kretschmann b3510230e9
More footer data (#224)
* output total datatoken liquidity in footer stats

* add build id to footer

* write out repo metadata before build

* build tweaks

* add title

* refactor
2020-11-09 14:31:04 +01:00

24 lines
680 B
TypeScript

import React, { ReactElement } from 'react'
import repoMetadata from '../../../repo-metadata.json'
import styles from './BuildId.module.css'
export default function BuildId(): ReactElement {
const commitBranch = repoMetadata.branch
const commitId = repoMetadata.commit
const isMainBranch = commitBranch === 'main'
return (
<a
className={styles.buildId}
href={`https://github.com/oceanprotocol/market/tree/${
isMainBranch ? commitId : commitBranch
}`}
target="_blank"
rel="noreferrer"
title="Build ID referring to the linked commit hash."
>
{isMainBranch ? commitId.substring(0, 7) : commitBranch}
</a>
)
}