Migrate SignInSheet from js to ts
Summary: Migrated SignInSheet.js to SignInSheet.tsx Reviewed By: danielbuechele Differential Revision: D16735194 fbshipit-source-id: a7e039bf34b2784c55e6ebd4c8c17298a2f380cf
This commit is contained in:
committed by
Facebook Github Bot
parent
4f47f73e5e
commit
7fd7a26d7d
@@ -14,7 +14,7 @@ import MainSidebar from './chrome/MainSidebar.tsx';
|
||||
import BugReporterDialog from './chrome/BugReporterDialog.tsx';
|
||||
import ErrorBar from './chrome/ErrorBar.tsx';
|
||||
import ShareSheet from './chrome/ShareSheet.tsx';
|
||||
import SignInSheet from './chrome/SignInSheet.js';
|
||||
import SignInSheet from './chrome/SignInSheet.tsx';
|
||||
import ExportDataPluginSheet from './chrome/ExportDataPluginSheet.tsx';
|
||||
import ShareSheetExportFile from './chrome/ShareSheetExportFile.tsx';
|
||||
import PluginContainer from './PluginContainer.js';
|
||||
|
||||
@@ -10,16 +10,17 @@ import {
|
||||
Button,
|
||||
styled,
|
||||
Text,
|
||||
Component,
|
||||
FlexRow,
|
||||
Spacer,
|
||||
Input,
|
||||
Link,
|
||||
colors,
|
||||
} from 'flipper';
|
||||
import {login} from '../reducers/user.tsx';
|
||||
import {writeKeychain, getUser} from '../fb-stubs/user.tsx';
|
||||
import React, {Component} from 'react';
|
||||
import {writeKeychain, getUser} from '../fb-stubs/user';
|
||||
import {login} from '../reducers/user';
|
||||
import {connect} from 'react-redux';
|
||||
import {State as Store} from '../reducers';
|
||||
|
||||
const Container = styled(FlexColumn)({
|
||||
padding: 20,
|
||||
@@ -40,21 +41,23 @@ const TokenInput = styled(Input)({
|
||||
marginRight: 0,
|
||||
});
|
||||
|
||||
type OwnProps = {|
|
||||
onHide: () => mixed,
|
||||
|};
|
||||
|
||||
type Props = {|
|
||||
...OwnProps,
|
||||
login: (user: Object) => mixed,
|
||||
|};
|
||||
|
||||
type State = {
|
||||
token: string,
|
||||
loading: boolean,
|
||||
error: ?string,
|
||||
type OwnProps = {
|
||||
onHide: () => any;
|
||||
};
|
||||
|
||||
type StateFromProps = {};
|
||||
|
||||
type DispatchFromProps = {
|
||||
login: (user: Object) => any;
|
||||
};
|
||||
|
||||
type State = {
|
||||
token: string;
|
||||
loading: boolean;
|
||||
error: string | null | undefined;
|
||||
};
|
||||
|
||||
type Props = OwnProps & StateFromProps & DispatchFromProps;
|
||||
class SignInSheet extends Component<Props, State> {
|
||||
state = {
|
||||
token: '',
|
||||
@@ -118,7 +121,7 @@ class SignInSheet extends Component<Props, State> {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect<Props, OwnProps, _, _, _, _>(
|
||||
export default connect<StateFromProps, DispatchFromProps, OwnProps, Store>(
|
||||
() => ({}),
|
||||
{login},
|
||||
)(SignInSheet);
|
||||
Reference in New Issue
Block a user