Skip to content

Commit 94334a2

Browse files
committed
fix UserItem
1 parent 9e31d9d commit 94334a2

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/components/Users/UserItem.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ class UserItem extends Component {
1616
componentDidMount() {
1717
if (!this.props.user) {
1818
this.setState({ loading: true });
19+
}
1920

20-
this.props.firebase
21-
.user(this.props.match.params.id)
22-
.on('value', snapshot => {
23-
this.props.onSetUser(
24-
snapshot.val(),
25-
this.props.match.params.id,
26-
);
21+
this.props.firebase
22+
.user(this.props.match.params.id)
23+
.on('value', snapshot => {
24+
this.props.onSetUser(
25+
snapshot.val(),
26+
this.props.match.params.id,
27+
);
2728

28-
this.setState({ loading: false });
29-
});
30-
}
29+
this.setState({ loading: false });
30+
});
3131
}
3232

3333
componentWillUnmount() {

0 commit comments

Comments
 (0)