Skip to content

Commit

Permalink
User Options | Dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Mar 8, 2021
1 parent ad74e81 commit 9bee050
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/common/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ export const isValidPassword = (password, strength, minStrength = 3) => {

export const getUserInitials = user => {
user = user || getCurrentUser();
if(!user)
return '';

let result = '';
const first_name = get(user, 'first_name', '').trim();
Expand Down
7 changes: 1 addition & 6 deletions src/components/users/UserOptions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ const UserOptions = () => {
handleClose(event);
setForm(true);
}
const onLogout = event => {
event.persist();
handleClose(event);
onLogoutClick();
}
const displayName = user.name || user.username;

return (
Expand Down Expand Up @@ -106,7 +101,7 @@ const UserOptions = () => {
</Tooltip>
<Divider />
<ListItem style={{display: 'flex', justifyContent: 'center', padding: '16px'}}>
<Button size='small' startIcon={<LogoutIcon fontSize='inherit' color='inherit' />} variant='outlined' onClick={onLogout}>
<Button size='small' startIcon={<LogoutIcon fontSize='inherit' color='inherit' />} variant='outlined' onClick={onLogoutClick}>
Sign Out
</Button>
</ListItem>
Expand Down

0 comments on commit 9bee050

Please sign in to comment.