Skip to content

Commit

Permalink
Merge pull request #70 from kbaseIncubator/gravatar-fix
Browse files Browse the repository at this point in the history
Provided an app level gravatarDefault.
  • Loading branch information
dakotablair authored Jan 19, 2021
2 parents 2ada3aa + 39dd0a3 commit 58386d2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/components/global_header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ export class Header extends Component<Props, State> {
if (res) {
const avatarOption = res.profile.userdata.avatarOption;
const gravatarHash = res.profile.synced.gravatarHash;
const gravatarDefault = res.profile.userdata.gravatarDefault;
const gravatarDefault =
res.profile.userdata.gravatarDefault || 'identicon';
const username = res.user.username;
const realname = res.user.realname;
this.setState({
Expand Down
13 changes: 13 additions & 0 deletions src/client/components/global_header/__tests__/Header.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @jest-environment jsdom
*/

import React from 'react';
import { shallow } from 'enzyme';

import { Header } from '../Header';

describe('Header tests', () => {
it('<Header> should render', () =>
expect(shallow(<Header title="title" />)).toBeTruthy());
});

0 comments on commit 58386d2

Please sign in to comment.