Skip to content

Commit

Permalink
fix(user): fixed avatar image when local file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
batamar committed Aug 20, 2020
1 parent 151b271 commit 352ea74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/modules/common/components/SelectWithSearch.tsx
Expand Up @@ -7,7 +7,7 @@ import { graphql } from 'react-apollo';
import Select from 'react-select-plus';
import styled from 'styled-components';
import { IOption } from '../types';
import { __, confirm, withProps } from '../utils';
import { __, confirm, readFile, withProps } from '../utils';
import Icon from './Icon';

const SelectWrapper = styled.div`
Expand Down Expand Up @@ -44,7 +44,7 @@ type Props = {

const content = (option: IOption): React.ReactNode => (
<>
<Avatar src={option.avatar || '/images/avatar-colored.svg'} />
<Avatar src={option.avatar ? readFile(option.avatar) : '/images/avatar-colored.svg'} />
{option.label}
</>
);
Expand Down

0 comments on commit 352ea74

Please sign in to comment.