|
|
@ -116,12 +116,25 @@ Notice.prototype.render = function () { |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Notice.prototype.setInitialDisclaimerState = function () { |
|
|
|
|
|
|
|
if (document.getElementsByClassName('notice-box')[0].clientHeight < 310) { |
|
|
|
|
|
|
|
this.setState({disclaimerDisabled: false}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Notice.prototype.componentDidMount = function () { |
|
|
|
Notice.prototype.componentDidMount = function () { |
|
|
|
// eslint-disable-next-line react/no-find-dom-node
|
|
|
|
// eslint-disable-next-line react/no-find-dom-node
|
|
|
|
var node = findDOMNode(this) |
|
|
|
var node = findDOMNode(this) |
|
|
|
linker.setupListener(node) |
|
|
|
linker.setupListener(node) |
|
|
|
if (document.getElementsByClassName('notice-box')[0].clientHeight < 310) { |
|
|
|
this.setInitialDisclaimerState() |
|
|
|
this.setState({disclaimerDisabled: false}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Notice.prototype.componentDidUpdate = function (prevProps) { |
|
|
|
|
|
|
|
const { notice: { id } = {} } = this.props |
|
|
|
|
|
|
|
const { notice: { id: prevNoticeId } = {} } = prevProps |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (id !== prevNoticeId) { |
|
|
|
|
|
|
|
this.setInitialDisclaimerState() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|