mirror of
https://github.com/reactos/developer-web-interface.git
synced 2024-11-23 03:49:43 +00:00
removing unnecessary bind and using arrow function throughout
This commit is contained in:
parent
a4e42619a4
commit
59b3d94fdf
@ -16,9 +16,6 @@ import {
|
||||
class Branches extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.toggle = this.toggle.bind(this);
|
||||
this.Stylemodif = this.Stylemodif.bind(this);
|
||||
this.state = {
|
||||
dropdownOpen: false
|
||||
};
|
||||
@ -40,12 +37,12 @@ class Branches extends React.Component {
|
||||
</DropdownItem>
|
||||
);
|
||||
};
|
||||
toggle() {
|
||||
toggle = () => {
|
||||
this.setState(prevState => ({
|
||||
dropdownOpen: !prevState.dropdownOpen
|
||||
}));
|
||||
}
|
||||
Stylemodif(data) {
|
||||
};
|
||||
Stylemodif = data => {
|
||||
return {
|
||||
...data,
|
||||
styles: {
|
||||
@ -54,7 +51,7 @@ class Branches extends React.Component {
|
||||
maxHeight: 500
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
|
@ -99,11 +99,9 @@ class Commits extends React.Component {
|
||||
<h3>Latest Commits</h3>
|
||||
{this.props.isLoading.load ? (
|
||||
<div>
|
||||
<div>
|
||||
Fetching latest Commits of <strong>{this.props.branch} </strong>
|
||||
for you...
|
||||
<Loading />
|
||||
</div>
|
||||
Fetching latest Commits of <strong>{this.props.branch} </strong>
|
||||
for you...
|
||||
<Loading />
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
|
@ -11,9 +11,6 @@ import { currState, loadPulls } from '../redux/actions';
|
||||
class pullState extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.toggle = this.toggle.bind(this);
|
||||
this.Stylemodif = this.Stylemodif.bind(this);
|
||||
this.state = {
|
||||
dropdownOpen: false
|
||||
};
|
||||
@ -32,12 +29,12 @@ class pullState extends React.Component {
|
||||
</DropdownItem>
|
||||
);
|
||||
};
|
||||
toggle() {
|
||||
toggle = () => {
|
||||
this.setState(prevState => ({
|
||||
dropdownOpen: !prevState.dropdownOpen
|
||||
}));
|
||||
}
|
||||
Stylemodif(data) {
|
||||
};
|
||||
Stylemodif = data => {
|
||||
return {
|
||||
...data,
|
||||
styles: {
|
||||
@ -46,7 +43,7 @@ class pullState extends React.Component {
|
||||
maxHeight: 500
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
render() {
|
||||
return (
|
||||
<Dropdown isOpen={this.state.dropdownOpen} toggle={this.toggle}>
|
||||
|
Loading…
Reference in New Issue
Block a user