diff options
-rw-r--r-- | frontend/src/components/home/ChooseNameForm.tsx (renamed from frontend/src/components/home/ChooseNameForm.jsx) | 7 | ||||
-rw-r--r-- | frontend/src/components/home/Home.tsx (renamed from frontend/src/components/home/Home.jsx) | 1 |
2 files changed, 3 insertions, 5 deletions
diff --git a/frontend/src/components/home/ChooseNameForm.jsx b/frontend/src/components/home/ChooseNameForm.tsx index 71279e35..8292150b 100644 --- a/frontend/src/components/home/ChooseNameForm.jsx +++ b/frontend/src/components/home/ChooseNameForm.tsx @@ -1,6 +1,5 @@ -// @flow import { Button, Classes, InputGroup, Intent } from '@blueprintjs/core'; -import React, { Component } from 'react'; +import React, { ChangeEvent, Component, SyntheticEvent } from 'react'; import { connect } from 'react-redux'; import { actions } from '../../redux/actions/user'; @@ -11,7 +10,7 @@ type ChooseNameFormPresenterProps = { class ChooseNameFormPresenter extends Component<ChooseNameFormPresenterProps> { _username = ''; - play = e => { + play = (e: SyntheticEvent<any>) => { e.preventDefault(); if (this._username !== undefined) { this.props.chooseUsername(this._username); @@ -24,7 +23,7 @@ class ChooseNameFormPresenter extends Component<ChooseNameFormPresenterProps> { <InputGroup className={Classes.LARGE} placeholder="Username" - onChange={e => (this._username = e.target.value)} + onChange={(e: ChangeEvent<HTMLInputElement>) => (this._username = e.target.value)} rightElement={this.renderSubmit()} /> </form> diff --git a/frontend/src/components/home/Home.jsx b/frontend/src/components/home/Home.tsx index 91065ec7..094db658 100644 --- a/frontend/src/components/home/Home.jsx +++ b/frontend/src/components/home/Home.tsx @@ -1,4 +1,3 @@ -// @flow import * as React from 'react'; import { Flex } from 'reflexbox'; import { ChooseNameForm } from './ChooseNameForm'; |