Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
initTopAppBar = topAppBarEle => this.topAppBar = topAppBarEle && new MDCTopAppBar(topAppBarEle);
initTopAppBar = () => {
if (this.state.topAppBar) {
this.state.topAppBar.destroy();
}
this.setState({topAppBar: new MDCTopAppBar(this.topAppBarRef.current)});
}
initTopAppBar = topAppBarEle => {
const {match} = this.props;
this.topAppBar = new MDCTopAppBar(topAppBarEle);
if (match.params.type === 'dismissible' || match.params.type === 'modal') {
topAppBarEle.addEventListener('MDCTopAppBar:nav', () => this.drawer.open = !this.drawer.open);
}
};