Skip to content

Commit

Permalink
Close side nav after selecting menu + ui improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinesalib committed Jun 30, 2020
1 parent eb7ce2d commit c259e2f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const NavigationLinks = (props) => {
<NavLink
exact={exact}
className={props.styles.link}
onClick={props.onClick}
activeClassName={props.styles.linkActive} to={to}>
{title}
</NavLink>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ function userProperties(user) {
}
}

function settings(user) {
function settings(user, closeEvent) {
if (user.email) {
return <div>
<LineDivisor />
<div className={styles.linksBox}>
<NavLink
exact={true}
className={styles.link}
onClick={closeEvent}
activeClassName={styles.linkActive} to='/settings'>
Configurações
</NavLink>
Expand Down Expand Up @@ -65,8 +66,8 @@ const sideNavigation = (props) => {
<Backdrop show={props.visible} clicked={props.close} />
<div className={attachedClasses.join(' ')}>
{userProperties(props.user)}
<NavigationLinks styles={styles} />
{settings(props.user)}
<NavigationLinks styles={styles} onClick={props.close} />
{settings(props.user, props.close)}
<LineDivisor />
{loginLogout(props.user)}
</div>
Expand Down
2 changes: 2 additions & 0 deletions app/javascript/containers/UserSettings/UserSettings.sass
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
margin: 0
width: auto
height: auto
background-color: transparent
border: none

.textInput
width: auto
Expand Down

0 comments on commit c259e2f

Please sign in to comment.