Commit 1cee3c68 authored by Linda's avatar Linda

removed some leftovers

parent 7313f265
......@@ -23,13 +23,9 @@ const AnimateHOC = Component => {
this.handleClick = this.handleClick.bind(this);
}
handleClick () {
if (this.state.wasClicked) { // if the button has been clicked before
this.props.onClick(this.props.id);
} else {
this.setState({ // else tell the state that the button has been clicked
wasClicked: true
}, () => this.props.onClick(this.props.id)); // callback after state has been updated
}
this.setState({ // else tell the state that the button has been clicked
wasClicked: true
}, () => this.props.onClick(this.props.id)); // callback after state has been updated
}
render () {
const {wasClicked} = this.state;
......
......@@ -8,7 +8,6 @@ require('./modal.scss');
const StudioButton = ({
hasRequestOutstanding,
id,
includesProject,
title,
onClick,
......@@ -49,7 +48,6 @@ const StudioButton = ({
{'studio-selector-button-selected':
includesProject && !hasRequestOutstanding}
)}
data-id={id}
onClick={onClick}
>
<div
......@@ -60,7 +58,7 @@ const StudioButton = ({
)}
title={title}
>
{title}{wasClicked}
{title}
</div>
<div
className={classNames(
......@@ -78,7 +76,6 @@ const StudioButton = ({
StudioButton.propTypes = {
hasRequestOutstanding: PropTypes.bool,
id: PropTypes.number,
includesProject: PropTypes.bool,
onClick: PropTypes.func,
title: PropTypes.string,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment