(Feature) #416 - Add releases link (#936)

* - Add releases link

* - Adds border bottom

* Merge branch 'development' into 623-show-more

# Conflicts:
#	src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/index.tsx

* fix hooks import casing

* Improves css link

* Fix hooks import

* Fix hooks import

* Link styling

Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
This commit is contained in:
Agustin Pane 2020-05-28 11:28:57 -03:00 committed by GitHub
parent 2eeb9fc094
commit cf38e97907
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 3 deletions

View File

@ -1,4 +1,5 @@
import { makeStyles } from '@material-ui/core/styles' import { makeStyles } from '@material-ui/core/styles'
import cn from 'classnames'
import { withSnackbar } from 'notistack' import { withSnackbar } from 'notistack'
import React from 'react' import React from 'react'
import { useDispatch, useSelector } from 'react-redux' import { useDispatch, useSelector } from 'react-redux'
@ -21,6 +22,7 @@ import { TX_NOTIFICATION_TYPES } from 'src/logic/safe/transactions'
import UpdateSafeModal from 'src/routes/safe/components/Settings/UpdateSafeModal' import UpdateSafeModal from 'src/routes/safe/components/Settings/UpdateSafeModal'
import { grantedSelector } from 'src/routes/safe/container/selector' import { grantedSelector } from 'src/routes/safe/container/selector'
import updateSafe from 'src/routes/safe/store/actions/updateSafe' import updateSafe from 'src/routes/safe/store/actions/updateSafe'
import Link from 'src/components/layout/Link'
import { import {
latestMasterContractVersionSelector, latestMasterContractVersionSelector,
safeCurrentVersionSelector, safeCurrentVersionSelector,
@ -72,8 +74,15 @@ const SafeDetails = (props) => {
<Heading tag="h2">Safe Version</Heading> <Heading tag="h2">Safe Version</Heading>
<Row align="end" grow> <Row align="end" grow>
<Paragraph className={classes.versionNumber}> <Paragraph className={classes.versionNumber}>
{safeCurrentVersion} <Link
{safeNeedsUpdate && ` (there's a newer version: ${latestMasterContractVersion})`} className={cn(classes.item, classes.link)}
color="black"
target="_blank"
to="https://github.com/gnosis/safe-contracts/releases"
>
{safeCurrentVersion}
{safeNeedsUpdate && ` (there's a newer version: ${latestMasterContractVersion})`}
</Link>
</Paragraph> </Paragraph>
</Row> </Row>
{safeNeedsUpdate && isUserOwner ? ( {safeNeedsUpdate && isUserOwner ? (

View File

@ -1,4 +1,4 @@
import { boldFont, border, lg, sm } from 'src/theme/variables' import { boldFont, border, lg, sm, connected } from 'src/theme/variables'
export const styles = () => ({ export const styles = () => ({
formContainer: { formContainer: {
@ -23,4 +23,11 @@ export const styles = () => ({
versionNumber: { versionNumber: {
height: '21px', height: '21px',
}, },
link: {
color: `${connected}`,
textDecoration: 'none',
'&:hover': {
textDecoration: 'underline',
},
},
}) })