Appease the linting gods

pull/10616/head
Christopher Henn 2018-07-11 14:24:08 -07:00 committed by Chris Henn
parent 6b92c0b5f1
commit 7bbd6e1e3d
2 changed files with 24 additions and 20 deletions

View File

@ -76,20 +76,24 @@ class TemplateControlBar extends Component<Props, State> {
)
}
return templates.map(template => (
<TemplateControl
key={template.id}
meRole={meRole}
isUsingAuth={isUsingAuth}
template={template}
templates={templates}
source={source}
onPickValue={v => onPickTemplate(template, v)}
onCreateTemplate={this.handleCreateTemplate}
onUpdateTemplate={this.handleUpdateTemplate}
onDeleteTemplate={this.handleDeleteTemplate}
/>
))
return templates.map(template => {
const onPickValue = v => onPickTemplate(template, v)
return (
<TemplateControl
key={template.id}
meRole={meRole}
isUsingAuth={isUsingAuth}
template={template}
templates={templates}
source={source}
onPickValue={onPickValue}
onCreateTemplate={this.handleCreateTemplate}
onUpdateTemplate={this.handleUpdateTemplate}
onDeleteTemplate={this.handleDeleteTemplate}
/>
)
})
}
private handleAddVariable = (): void => {

View File

@ -19,18 +19,18 @@ interface State {
}
class TextTemplateSelector extends PureComponent<Props, State> {
constructor(props) {
super(props)
this.state = {text: ''}
}
public static getDerivedStateFromProps(props) {
const text = getDeep<string>(props, 'template.values.0.value', '')
return {text}
}
constructor(props) {
super(props)
this.state = {text: ''}
}
public render() {
const {text} = this.state