From 64f40b61d88f121bf61f9ccf017822348a37676f Mon Sep 17 00:00:00 2001 From: Jori Lallo Date: Mon, 1 May 2017 22:29:39 -0700 Subject: [PATCH] Validation error for missing API key label --- frontend/scenes/Settings/Settings.js | 94 +++++++++++++++++----------- 1 file changed, 56 insertions(+), 38 deletions(-) diff --git a/frontend/scenes/Settings/Settings.js b/frontend/scenes/Settings/Settings.js index f3d47ef4..9720cd25 100644 --- a/frontend/scenes/Settings/Settings.js +++ b/frontend/scenes/Settings/Settings.js @@ -15,8 +15,8 @@ import SettingsStore from './SettingsStore'; @observer class Settings extends React.Component { store = SettingsStore; - constructor(props) { - super(props); + constructor() { + super(); this.store = new SettingsStore(); } @@ -99,41 +99,59 @@ import SettingsStore from './SettingsStore'; } } -const InlineForm = ({ - placeholder, - buttonLabel, - name, - value, - onChange, - onSubmit, - disabled, -}: { - placeholder: string, - buttonLabel: string, - name: string, - value: string, - onChange: Function, - onSubmit: Function, - disabled?: boolean, -}) => { - const handleSubmit = event => { - event.preventDefault(); - onSubmit(); +class InlineForm extends React.Component { + props: { + placeholder: string, + buttonLabel: string, + name: string, + value: string, + onChange: Function, + onSubmit: Function, + disabled?: boolean, }; - return ( -
- - -