Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
xavier506 committed Oct 25, 2021
2 parents 7497e70 + d4dbedb commit b9d8ed8
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
7 changes: 5 additions & 2 deletions webapp/src/components/Card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ const CardData = ({
average,
rate,
showOptions,
isNewRate
isNewRate,
disable
}) => {
const { t } = useTranslation('translations')
const [open, setOpen] = useState(false)
Expand Down Expand Up @@ -176,6 +177,7 @@ const CardData = ({
onClick={toggleSelection(!isSelected, owner)}
variant='outlined'
color={isSelected ? 'secondary' : 'primary'}
disabled={!isSelected && disable}
>
{isSelected ? t('remove') : buttonLabel}
</Button>
Expand Down Expand Up @@ -230,7 +232,8 @@ CardData.propTypes = {
average: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
rate: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
showOptions: PropTypes.bool,
isNewRate: PropTypes.bool
isNewRate: PropTypes.bool,
disable: PropTypes.bool
}

CardData.defaultProps = {
Expand Down
11 changes: 9 additions & 2 deletions webapp/src/components/Sidebar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ExternalLink.propTypes = {
className: PropTypes.string
}

const ListItem = ({ childrens, name, path, icon, isUserLogged }) => {
const ListItem = ({ childrens, name, path, icon, isUserLogged, badge }) => {
const classes = useStyles()
const { t } = useTranslation('translations')

Expand All @@ -67,7 +67,13 @@ const ListItem = ({ childrens, name, path, icon, isUserLogged }) => {
href={path}
>
{icon && <ListItemIcon>{icon}</ListItemIcon>}
<ListItemText primary={t(name)} />
<ListItemText
className={{ [classes.versionStyle]: badge }}
primary={t(name)}
/>
{badge && (
<ListItemText className={classes.versionStyle} primary={badge} />
)}
</MuiListItem>
</Box>
)
Expand All @@ -77,6 +83,7 @@ ListItem.propTypes = {
childrens: PropTypes.array,
name: PropTypes.string,
path: PropTypes.string,
badge: PropTypes.string,
icon: PropTypes.node,
isUserLogged: PropTypes.bool
}
Expand Down
3 changes: 3 additions & 0 deletions webapp/src/components/Sidebar/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,8 @@ export default theme => ({
height: '48px !important',
marginBottom: theme.spacing(2),
marginLeft: theme.spacing(2)
},
versionStyle: {
width: 60
}
})
2 changes: 1 addition & 1 deletion webapp/src/config/main.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const appVersion = process.env.REACT_APP_TAG || 'v1.0'
export const appVersion = process.env.REACT_APP_VERSION || 'v1.0'
export const name = process.env.REACT_APP_NAME
export const title = process.env.REACT_APP_TITLE
export const stage = process.env.REACT_APP_MAINNET_VERSION
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/routes/BlockProducers/BlockProducerProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ const BlockProducerProfile = () => {
rel='noopener'
target='_blank'
style={{ color: 'white' }}
href={`${mainConfig.AdditionalResourcesblockExplorer}/transaction/${state.transaction?.transactionId}`}
href={`${mainConfig.blockExplorer}/transaction/${state.transaction?.transactionId}`}
>
{state.transaction?.transactionId}
</MLink>
Expand Down
1 change: 1 addition & 0 deletions webapp/src/routes/BlockProducers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ const AllBps = () => {
({ owner }) => owner === blockProducer.owner
)
}
disable={state?.selectedProducers?.length > 29}
/>
</Box>
))}
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const routes = [
{
name: 'version',
badge: mainConfig.appVersion,
path: 'https://github.com/eoscostarica/full-stack-boilerplate/tags',
path: 'https://github.com/eoscostarica/eos-rate/releases',
icon: <CallMergeIcon />,
target: '_blank'
},
Expand Down

0 comments on commit b9d8ed8

Please sign in to comment.