mirror of
https://github.com/mattermost/focalboard.git
synced 2024-12-30 14:00:07 +02:00
Fix linting
This commit is contained in:
parent
8f7e6c0ba5
commit
a67236b1af
@ -1,9 +1,9 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import PropTypes from 'prop-types'
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
type Props = {
|
||||
children: React.ReactNode
|
||||
@ -21,21 +21,21 @@ export default class RootPortal extends React.PureComponent<Props> {
|
||||
this.el = document.createElement('div')
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
componentDidMount(): void {
|
||||
const rootPortal = document.getElementById('root-portal')
|
||||
if (rootPortal) {
|
||||
rootPortal.appendChild(this.el)
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
componentWillUnmount(): void {
|
||||
const rootPortal = document.getElementById('root-portal')
|
||||
if (rootPortal) {
|
||||
rootPortal.removeChild(this.el)
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
render(): JSX.Element {
|
||||
return ReactDOM.createPortal(
|
||||
this.props.children,
|
||||
this.el,
|
||||
|
Loading…
Reference in New Issue
Block a user