|
@@ -1,5 +1,3 @@
|
|
|
-import {Component} from 'react';
|
|
|
-
|
|
|
import ActorAvatar from 'sentry/components/avatar/actorAvatar';
|
|
|
import {Actor} from 'sentry/types';
|
|
|
|
|
@@ -12,16 +10,12 @@ type Props = {
|
|
|
value: Value;
|
|
|
};
|
|
|
|
|
|
-export default class ValueComponent extends Component<Props> {
|
|
|
- handleClick = () => {
|
|
|
- this.props.onRemove(this.props.value);
|
|
|
- };
|
|
|
-
|
|
|
- render() {
|
|
|
- return (
|
|
|
- <a onClick={this.handleClick}>
|
|
|
- <ActorAvatar actor={this.props.value.actor} size={28} />
|
|
|
- </a>
|
|
|
- );
|
|
|
- }
|
|
|
+function ValueComponent({value, onRemove}: Props) {
|
|
|
+ return (
|
|
|
+ <a onClick={() => onRemove(value)}>
|
|
|
+ <ActorAvatar actor={value.actor} size={28} />
|
|
|
+ </a>
|
|
|
+ );
|
|
|
}
|
|
|
+
|
|
|
+export default ValueComponent;
|