Upgrading flow and fixing lint errors
Summary: Upgrading to flow 0.91, fixing a bunch of `$FloxFixMe`s that were introduced by upgrading to 0.86. Also fixing some linting issues. Reviewed By: priteshrnandgaonkar Differential Revision: D13900794 fbshipit-source-id: 5d0a1b62371f3b5d34b909bae0876583acb6f977
This commit is contained in:
committed by
Facebook Github Bot
parent
88cc299811
commit
09a93cd9e6
@@ -11,12 +11,17 @@ import Sidebar from '../ui/components/Sidebar';
|
||||
import {connect} from 'react-redux';
|
||||
import {toggleRightSidebarAvailable} from '../reducers/application.js';
|
||||
|
||||
type Props = {
|
||||
type OwnProps = {|
|
||||
children: any,
|
||||
width?: number,
|
||||
minWidth?: number,
|
||||
|};
|
||||
|
||||
type Props = {
|
||||
...OwnProps,
|
||||
rightSidebarVisible: boolean,
|
||||
rightSidebarAvailable: boolean,
|
||||
toggleRightSidebarAvailable: (visible?: boolean) => any,
|
||||
width?: number,
|
||||
};
|
||||
|
||||
class DetailSidebar extends React.Component<Props> {
|
||||
@@ -42,7 +47,10 @@ class DetailSidebar extends React.Component<Props> {
|
||||
this.props.rightSidebarVisible &&
|
||||
domNode &&
|
||||
ReactDOM.createPortal(
|
||||
<Sidebar width={this.props.width || 300} position="right">
|
||||
<Sidebar
|
||||
minWidth={this.props.minWidth}
|
||||
width={this.props.width || 300}
|
||||
position="right">
|
||||
{this.props.children}
|
||||
</Sidebar>,
|
||||
domNode,
|
||||
@@ -51,11 +59,7 @@ class DetailSidebar extends React.Component<Props> {
|
||||
}
|
||||
}
|
||||
|
||||
/* $FlowFixMe(>=0.86.0) This
|
||||
* comment suppresses an error found when Flow v0.86 was
|
||||
* deployed. To see the error, delete this comment and
|
||||
* run Flow. */
|
||||
export default connect(
|
||||
export default connect<Props, OwnProps, _, _, _, _>(
|
||||
({application: {rightSidebarVisible, rightSidebarAvailable}}) => ({
|
||||
rightSidebarVisible,
|
||||
rightSidebarAvailable,
|
||||
|
||||
Reference in New Issue
Block a user