Skip to content

Commit

Permalink
improve code style
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed May 27, 2020
1 parent 9a9a19d commit 1d927df
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions site/theme/template/Layout/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ export default class Layout extends React.Component {
direction: 'ltr',
setIframeTheme: this.setIframeTheme,
};

this.changeDirection = this.changeDirection.bind(this);
}

getChildContext() {
Expand Down Expand Up @@ -194,11 +192,11 @@ export default class Layout extends React.Component {
setTwoToneColor(iconTwoToneThemeMap[theme] || iconTwoToneThemeMap.default);
};

changeDirection(direction) {
changeDirection = direction => {
this.setState({
direction,
});
}
};

render() {
const { children, helmetContext = {}, ...restProps } = this.props;
Expand Down

0 comments on commit 1d927df

Please sign in to comment.