Skip to content

Commit

Permalink
Remove decorator, replace with HOC
Browse files Browse the repository at this point in the history
  • Loading branch information
coyotte508 committed Apr 8, 2018
1 parent e0a5128 commit 11914c7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
3 changes: 0 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
"plugins": ["rewire"]
}
},
"plugins": [
"transform-decorators-legacy"
],
"presets": [
"es2015",
"stage-0",
Expand Down
3 changes: 1 addition & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"ecmaFeatures": {
"jsx": true,
"classes": true,
"modules": true,
"experimentalDecorators": true
"modules": true
},
"env": {
// I write for browser
Expand Down
5 changes: 2 additions & 3 deletions app/components/chart/trends.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ const TrendsContainer = viz.containers.TrendsContainer;
const reshapeBgClassesToBgBounds = viz.utils.reshapeBgClassesToBgBounds;
const Loader = viz.components.Loader;

@translate()
class Trends extends PureComponent {
const Trends = translate()(class extends PureComponent {
static propTypes = {
bgPrefs: PropTypes.object.isRequired,
chartPrefs: PropTypes.object.isRequired,
Expand Down Expand Up @@ -502,6 +501,6 @@ class Trends extends PureComponent {
focusedPoint={this.props.trendsState[currentPatientInViewId].focusedSmbg} />
);
}
}
});

export default Trends;

0 comments on commit 11914c7

Please sign in to comment.