Migrated ExportDataPluginSheet from js to ts
Summary: Migrated ExportDataPluginSheet.js to ExportDataPluginSheet.tsx Reviewed By: passy Differential Revision: D16731274 fbshipit-source-id: 5025f6eb34465d84e276f21855ee78cb98e8cd8d
This commit is contained in:
committed by
Facebook Github Bot
parent
b5c01bdf36
commit
46b032d5ed
@@ -15,7 +15,7 @@ import BugReporterDialog from './chrome/BugReporterDialog.tsx';
|
||||
import ErrorBar from './chrome/ErrorBar.tsx';
|
||||
import ShareSheet from './chrome/ShareSheet.js';
|
||||
import SignInSheet from './chrome/SignInSheet.js';
|
||||
import ExportDataPluginSheet from './chrome/ExportDataPluginSheet.js';
|
||||
import ExportDataPluginSheet from './chrome/ExportDataPluginSheet.tsx';
|
||||
import ShareSheetExportFile from './chrome/ShareSheetExportFile.js';
|
||||
import PluginContainer from './PluginContainer.js';
|
||||
import Sheet from './chrome/Sheet.js';
|
||||
|
||||
@@ -5,35 +5,40 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import {Component, connect} from 'flipper';
|
||||
import type {ShareType} from '../reducers/application.tsx';
|
||||
import type {State as PluginState} from '../reducers/plugins.tsx';
|
||||
import type {State as PluginStatesState} from '../reducers/pluginStates.tsx';
|
||||
import type {ActiveSheet} from '../reducers/application.tsx';
|
||||
import {selectedPlugins as actionForSelectedPlugins} from '../reducers/plugins.tsx';
|
||||
import {getActivePersistentPlugins} from '../utils/pluginUtils.tsx';
|
||||
import {connect} from 'react-redux';
|
||||
import React, {Component} from 'react';
|
||||
import {ShareType} from '../reducers/application';
|
||||
import {State as PluginState} from '../reducers/plugins';
|
||||
import {State as PluginStatesState} from '../reducers/pluginStates';
|
||||
import {State as Store} from '../reducers';
|
||||
import {ActiveSheet} from '../reducers/application';
|
||||
import {selectedPlugins as actionForSelectedPlugins} from '../reducers/plugins';
|
||||
import {getActivePersistentPlugins} from '../utils/pluginUtils';
|
||||
import {
|
||||
ACTIVE_SHEET_SHARE_DATA,
|
||||
setActiveSheet as getActiveSheetAction,
|
||||
setExportDataToFileActiveSheet as getExportDataToFileActiveSheetAction,
|
||||
} from '../reducers/application.tsx';
|
||||
} from '../reducers/application';
|
||||
import SelectPluginSheet from './SelectPluginSheet';
|
||||
|
||||
type OwnProps = {|
|
||||
onHide: () => mixed,
|
||||
|};
|
||||
type OwnProps = {
|
||||
onHide: () => any;
|
||||
};
|
||||
|
||||
type Props = {|
|
||||
...OwnProps,
|
||||
share: ShareType,
|
||||
plugins: PluginState,
|
||||
pluginStates: PluginStatesState,
|
||||
selectedPlugins: (payload: Array<string>) => void,
|
||||
setActiveSheet: (payload: ActiveSheet) => void,
|
||||
setExportDataToFileActiveSheet: (payload: string) => void,
|
||||
|};
|
||||
type StateFromProps = {
|
||||
share: ShareType;
|
||||
plugins: PluginState;
|
||||
pluginStates: PluginStatesState;
|
||||
};
|
||||
|
||||
class ExportDataPluginSheet extends Component<Props, *> {
|
||||
type DispatchFromProps = {
|
||||
selectedPlugins: (payload: Array<string>) => void;
|
||||
setActiveSheet: (payload: ActiveSheet) => void;
|
||||
setExportDataToFileActiveSheet: (payload: string) => void;
|
||||
};
|
||||
|
||||
type Props = OwnProps & StateFromProps & DispatchFromProps;
|
||||
class ExportDataPluginSheet extends Component<Props> {
|
||||
render() {
|
||||
const {plugins, pluginStates, onHide} = this.props;
|
||||
return (
|
||||
@@ -79,9 +84,9 @@ class ExportDataPluginSheet extends Component<Props, *> {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect<Props, OwnProps, _, _, _, _>(
|
||||
export default connect<StateFromProps, DispatchFromProps, OwnProps, Store>(
|
||||
({application: {share}, plugins, pluginStates}) => ({
|
||||
share: share,
|
||||
share,
|
||||
plugins,
|
||||
pluginStates,
|
||||
}),
|
||||
Reference in New Issue
Block a user