Improve names of states and getters
parent
2baabf272c
commit
261fecf8ad
|
@ -27,7 +27,7 @@ interface Props {
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
searchTerm: string
|
searchTerm: string
|
||||||
showOverlay: boolean
|
isOverlayVisible: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
@ErrorHandling
|
@ErrorHandling
|
||||||
|
@ -37,7 +37,7 @@ class DashboardsPageContents extends Component<Props, State> {
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
searchTerm: '',
|
searchTerm: '',
|
||||||
showOverlay: false,
|
isOverlayVisible: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,15 +136,15 @@ class DashboardsPageContents extends Component<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private handleToggleOverlay = (): void => {
|
private handleToggleOverlay = (): void => {
|
||||||
this.setState({showOverlay: !this.state.showOverlay})
|
this.setState({isOverlayVisible: !this.state.isOverlayVisible})
|
||||||
}
|
}
|
||||||
|
|
||||||
private get renderImportOverlay(): JSX.Element {
|
private get renderImportOverlay(): JSX.Element {
|
||||||
const {onImportDashboard, notify} = this.props
|
const {onImportDashboard, notify} = this.props
|
||||||
const {showOverlay} = this.state
|
const {isOverlayVisible} = this.state
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<OverlayTechnology visible={showOverlay}>
|
<OverlayTechnology visible={isOverlayVisible}>
|
||||||
<ImportDashboardOverlay
|
<ImportDashboardOverlay
|
||||||
onDismissOverlay={this.handleToggleOverlay}
|
onDismissOverlay={this.handleToggleOverlay}
|
||||||
onImportDashboard={onImportDashboard}
|
onImportDashboard={onImportDashboard}
|
||||||
|
|
|
@ -49,7 +49,7 @@ interface Props {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
showWriteForm: boolean
|
isWriteFormVisible: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
@ErrorHandling
|
@ErrorHandling
|
||||||
|
@ -58,7 +58,7 @@ export class DataExplorer extends PureComponent<Props, State> {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
showWriteForm: false,
|
isWriteFormVisible: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,11 +101,11 @@ export class DataExplorer extends PureComponent<Props, State> {
|
||||||
queryConfigActions,
|
queryConfigActions,
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
const {showWriteForm} = this.state
|
const {isWriteFormVisible} = this.state
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<OverlayTechnology visible={showWriteForm}>
|
<OverlayTechnology visible={isWriteFormVisible}>
|
||||||
<WriteDataForm
|
<WriteDataForm
|
||||||
source={source}
|
source={source}
|
||||||
errorThrown={errorThrownAction}
|
errorThrown={errorThrownAction}
|
||||||
|
@ -152,11 +152,11 @@ export class DataExplorer extends PureComponent<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private handleCloseWriteData = (): void => {
|
private handleCloseWriteData = (): void => {
|
||||||
this.setState({showWriteForm: false})
|
this.setState({isWriteFormVisible: false})
|
||||||
}
|
}
|
||||||
|
|
||||||
private handleOpenWriteData = (): void => {
|
private handleOpenWriteData = (): void => {
|
||||||
this.setState({showWriteForm: true})
|
this.setState({isWriteFormVisible: true})
|
||||||
}
|
}
|
||||||
|
|
||||||
private handleChooseTimeRange = (timeRange: TimeRange): void => {
|
private handleChooseTimeRange = (timeRange: TimeRange): void => {
|
||||||
|
|
|
@ -11,7 +11,7 @@ interface Props {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
showOverlay: boolean
|
isOverlayVisible: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
class FluxHeader extends PureComponent<Props, State> {
|
class FluxHeader extends PureComponent<Props, State> {
|
||||||
|
@ -19,7 +19,7 @@ class FluxHeader extends PureComponent<Props, State> {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
showOverlay: false,
|
isOverlayVisible: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,13 +31,13 @@ class FluxHeader extends PureComponent<Props, State> {
|
||||||
fullWidth={true}
|
fullWidth={true}
|
||||||
optionsComponents={this.optionsComponents}
|
optionsComponents={this.optionsComponents}
|
||||||
/>
|
/>
|
||||||
{this.renderOverlay}
|
{this.overlay}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private handleToggleOverlay = (): void => {
|
private handleToggleOverlay = (): void => {
|
||||||
this.setState({showOverlay: !this.state.showOverlay})
|
this.setState({isOverlayVisible: !this.state.isOverlayVisible})
|
||||||
}
|
}
|
||||||
|
|
||||||
private get optionsComponents(): JSX.Element {
|
private get optionsComponents(): JSX.Element {
|
||||||
|
@ -51,12 +51,12 @@ class FluxHeader extends PureComponent<Props, State> {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private get renderOverlay(): JSX.Element {
|
private get overlay(): JSX.Element {
|
||||||
const {service} = this.props
|
const {service} = this.props
|
||||||
const {showOverlay} = this.state
|
const {isOverlayVisible} = this.state
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<OverlayTechnology visible={showOverlay}>
|
<OverlayTechnology visible={isOverlayVisible}>
|
||||||
<FluxOverlay
|
<FluxOverlay
|
||||||
mode="edit"
|
mode="edit"
|
||||||
service={service}
|
service={service}
|
||||||
|
|
Loading…
Reference in New Issue