Skip to content

Commit

Permalink
Fixed duplicate componentDidMount
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickSachs committed Nov 13, 2018
1 parent 7e3c480 commit 581721c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/pages/admin/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@ export default injectIntl(class Admin extends React.Component {
}

componentDidMount() {
const title = this.props.intl.formatMessage({ id: "users.title" });
this.props.setPageTitle(title);
get("/api/users")
.then(({ data }) => this.setState({ users: data }))
.catch(console.error);
}

componentDidMount() {
const title = this.props.intl.formatMessage({ id: "users.title" });
this.props.setPageTitle(title);
}

render() {
const { users } = this.state;
return (
Expand Down

0 comments on commit 581721c

Please sign in to comment.