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 BugReporterDialog from './chrome/BugReporterDialog.tsx';
|
||||||
import ErrorBar from './chrome/ErrorBar.tsx';
|
import ErrorBar from './chrome/ErrorBar.tsx';
|
||||||
import ShareSheet from './chrome/ShareSheet.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 ExportDataPluginSheet from './chrome/ExportDataPluginSheet.tsx';
|
||||||
import ShareSheetExportFile from './chrome/ShareSheetExportFile.tsx';
|
import ShareSheetExportFile from './chrome/ShareSheetExportFile.tsx';
|
||||||
import PluginContainer from './PluginContainer.js';
|
import PluginContainer from './PluginContainer.js';
|
||||||
|
|||||||
@@ -10,16 +10,17 @@ import {
|
|||||||
Button,
|
Button,
|
||||||
styled,
|
styled,
|
||||||
Text,
|
Text,
|
||||||
Component,
|
|
||||||
FlexRow,
|
FlexRow,
|
||||||
Spacer,
|
Spacer,
|
||||||
Input,
|
Input,
|
||||||
Link,
|
Link,
|
||||||
colors,
|
colors,
|
||||||
} from 'flipper';
|
} from 'flipper';
|
||||||
import {login} from '../reducers/user.tsx';
|
import React, {Component} from 'react';
|
||||||
import {writeKeychain, getUser} from '../fb-stubs/user.tsx';
|
import {writeKeychain, getUser} from '../fb-stubs/user';
|
||||||
|
import {login} from '../reducers/user';
|
||||||
import {connect} from 'react-redux';
|
import {connect} from 'react-redux';
|
||||||
|
import {State as Store} from '../reducers';
|
||||||
|
|
||||||
const Container = styled(FlexColumn)({
|
const Container = styled(FlexColumn)({
|
||||||
padding: 20,
|
padding: 20,
|
||||||
@@ -40,21 +41,23 @@ const TokenInput = styled(Input)({
|
|||||||
marginRight: 0,
|
marginRight: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
type OwnProps = {|
|
type OwnProps = {
|
||||||
onHide: () => mixed,
|
onHide: () => any;
|
||||||
|};
|
|
||||||
|
|
||||||
type Props = {|
|
|
||||||
...OwnProps,
|
|
||||||
login: (user: Object) => mixed,
|
|
||||||
|};
|
|
||||||
|
|
||||||
type State = {
|
|
||||||
token: string,
|
|
||||||
loading: boolean,
|
|
||||||
error: ?string,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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> {
|
class SignInSheet extends Component<Props, State> {
|
||||||
state = {
|
state = {
|
||||||
token: '',
|
token: '',
|
||||||
@@ -118,7 +121,7 @@ class SignInSheet extends Component<Props, State> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect<Props, OwnProps, _, _, _, _>(
|
export default connect<StateFromProps, DispatchFromProps, OwnProps, Store>(
|
||||||
() => ({}),
|
() => ({}),
|
||||||
{login},
|
{login},
|
||||||
)(SignInSheet);
|
)(SignInSheet);
|
||||||
Reference in New Issue
Block a user