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

output version number in footer

This commit is contained in:
Matthias Kretschmann 2019-05-28 12:30:57 +02:00
parent c742426b1a
commit 2395c3ff21
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 34 additions and 0 deletions

View File

@ -91,3 +91,9 @@
} }
} }
} }
.version {
font-family: $font-family-monospace;
font-size: $font-size-mini;
margin-top: $spacer;
}

View File

@ -5,6 +5,33 @@ import { ReactComponent as AiCommons } from '../../img/aicommons.svg'
import styles from './Footer.module.scss' import styles from './Footer.module.scss'
import meta from '../../data/meta.json' import meta from '../../data/meta.json'
import { version } from '../../../package.json'
import { version as versionSquid } from '@oceanprotocol/squid/package.json'
const VersionNumber = () => {
const versionOutput =
process.env.NODE_ENV === 'production'
? `v${version}`
: `v${version}-dev`
return (
<p className={styles.version}>
<a
title="See commons release on GitHub"
href={`https://github.com/oceanprotocol/commons/releases/tag/v${version}`}
>
{versionOutput}
</a>{' '}
&mdash;{' '}
<a
title="See squid-js release on GitHub"
href={`https://github.com/oceanprotocol/squid-js/releases/tag/v${versionSquid}`}
>
squid-js v{versionSquid}
</a>
</p>
)
}
const Footer = () => ( const Footer = () => (
<footer className={styles.footer}> <footer className={styles.footer}>
@ -30,6 +57,7 @@ const Footer = () => (
<AiCommons /> <AiCommons />
</a> </a>
</p> </p>
<VersionNumber />
</Content> </Content>
</aside> </aside>