Skip to content

Commit

Permalink
Merge pull request forbole#282 from forbole/hotfix/desmos-profile
Browse files Browse the repository at this point in the history
hotfix: desmos profiles
  • Loading branch information
ryuash authored Sep 3, 2021
2 parents 2eb5be5 + 9c24f96 commit a45bc25
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# base-v1.0.9 - 2021-09-03

## Bug fixes
- Fixed desmos profile edge case display

# base-v1.0.8 - 2021-09-03

## Changes
Expand Down
26 changes: 12 additions & 14 deletions src/components/desmos_profile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ const DesmosProfile: React.FC<{
handleConnectionsOpen,
} = useDesmosProfile();

const displayConnections = props.connections.length ? '' : 'hide';

return (
<>
<Box className={classnames(props.className, classes.root)}>
Expand All @@ -36,20 +38,16 @@ const DesmosProfile: React.FC<{
imageUrl={props.imageUrl}
className={classes.avatar}
/>
{
!!props.connections.length && (
<Typography
variant="body1"
className={classes.link}
onClick={handleConnectionsOpen}
role="button"
>
{t('connections', {
connections: numeral(props.connections.length).format('0,0'),
})}
</Typography>
)
}
<Typography
variant="body1"
className={classnames(classes.link, displayConnections)}
onClick={handleConnectionsOpen}
role="button"
>
{t('connections', {
connections: numeral(props.connections.length).format('0,0'),
})}
</Typography>
</div>
<div className={classes.nicknameWrapper}>
<Typography variant="h2">
Expand Down
3 changes: 3 additions & 0 deletions src/components/desmos_profile/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ export const useStyles = (coverUrl?: string) => {
alignItems: 'center',
justifyContent: 'flex-end',
padding: theme.spacing(1.5, 0),
'& .hide': {
visibility: 'hidden',
},
[theme.breakpoints.up('md')]: {
paddingBottom: theme.spacing(2),
},
Expand Down

0 comments on commit a45bc25

Please sign in to comment.