cleanup code

pull/681/head
Audric Ackermann 6 years ago
parent 4999ececfd
commit 2fdb4c3540

@ -54,11 +54,9 @@ export class Avatar extends React.PureComponent<Props, State> {
return this.renderNoImage(); return this.renderNoImage();
} }
const borderRadius = '50%';
const borderStyle = this.getBorderStyle( const borderStyle = this.getBorderStyle(
borderColor, borderColor,
borderWidth, borderWidth,
borderRadius
); );
// Generate the seed // Generate the seed
@ -213,7 +211,7 @@ export class Avatar extends React.PureComponent<Props, State> {
: this.renderIdenticon(); : this.renderIdenticon();
} }
private getBorderStyle(color?: string, width?: number, radius?: string) { private getBorderStyle(color?: string, width?: number) {
const borderWidth = typeof width === 'number' ? width : 3; const borderWidth = typeof width === 'number' ? width : 3;
return color return color
@ -222,10 +220,6 @@ export class Avatar extends React.PureComponent<Props, State> {
borderStyle: 'solid', borderStyle: 'solid',
borderWidth: borderWidth, borderWidth: borderWidth,
} }
: radius
? {
borderRadius: radius,
}
: undefined; : undefined;
} }
} }

Loading…
Cancel
Save