Skip to content

Commit 9e1b9a9

Browse files
committed
Small fixes
1 parent 83b0e04 commit 9e1b9a9

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/example-forum/lib/components/common/Newsletter.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,16 @@ class Newsletter extends PureComponent {
1717
this.dismissBanner = this.dismissBanner.bind(this);
1818

1919
this.state = {
20-
showBanner: showBanner(props.currentUser)
20+
showBanner: false
2121
};
2222
}
2323

24+
componentDidMount() {
25+
this.setState({
26+
showBanner: showBanner(this.props.currentUser)
27+
});
28+
}
29+
2430
componentWillReceiveProps(nextProps, nextContext) {
2531
if (nextProps.currentUser) {
2632
this.setState({showBanner: showBanner(nextProps.currentUser)});

0 commit comments

Comments
 (0)