From f6f39544b29d91c08282faf8d70a739a3042a1a3 Mon Sep 17 00:00:00 2001 From: Joffrey BION Date: Sun, 5 May 2019 20:38:14 +0200 Subject: Migrate home components to TypeScript --- frontend/src/components/home/ChooseNameForm.jsx | 43 ------------------------- frontend/src/components/home/ChooseNameForm.tsx | 42 ++++++++++++++++++++++++ frontend/src/components/home/Home.jsx | 13 -------- frontend/src/components/home/Home.tsx | 12 +++++++ 4 files changed, 54 insertions(+), 56 deletions(-) delete mode 100644 frontend/src/components/home/ChooseNameForm.jsx create mode 100644 frontend/src/components/home/ChooseNameForm.tsx delete mode 100644 frontend/src/components/home/Home.jsx create mode 100644 frontend/src/components/home/Home.tsx diff --git a/frontend/src/components/home/ChooseNameForm.jsx b/frontend/src/components/home/ChooseNameForm.jsx deleted file mode 100644 index 71279e35..00000000 --- a/frontend/src/components/home/ChooseNameForm.jsx +++ /dev/null @@ -1,43 +0,0 @@ -// @flow -import { Button, Classes, InputGroup, Intent } from '@blueprintjs/core'; -import React, { Component } from 'react'; -import { connect } from 'react-redux'; -import { actions } from '../../redux/actions/user'; - -type ChooseNameFormPresenterProps = { - chooseUsername: (username: string) => void, -} - -class ChooseNameFormPresenter extends Component { - _username = ''; - - play = e => { - e.preventDefault(); - if (this._username !== undefined) { - this.props.chooseUsername(this._username); - } - }; - - render() { - return ( -
- (this._username = e.target.value)} - rightElement={this.renderSubmit()} - /> - - ); - } - - renderSubmit = () => ( -