Refactor export data functions and exportpersistedstate function to just expect state
Summary: This diff refactors the `exportpersistedstate` and few of the functions in exportData.tsx to just expect the Redux State instead the store object. Reviewed By: mweststrate Differential Revision: D18733011 fbshipit-source-id: 56739917b49142ba4b6e79e7c16378fe60d6ac3b
This commit is contained in:
committed by
Facebook Github Bot
parent
bf85da17ab
commit
ca53f35875
@@ -19,7 +19,7 @@ import {
|
||||
} from './api';
|
||||
import {Fragment} from 'react';
|
||||
import {ImagesMap} from './ImagePool';
|
||||
import {MetricType, MiddlewareAPI} from 'flipper';
|
||||
import {MetricType, ReduxState} from 'flipper';
|
||||
import React from 'react';
|
||||
import ImagesCacheOverview from './ImagesCacheOverview';
|
||||
import {
|
||||
@@ -101,7 +101,7 @@ export default class FlipperImagesPlugin extends FlipperPlugin<
|
||||
static exportPersistedState = (
|
||||
callClient: (method: string, params?: any) => Promise<any>,
|
||||
persistedState: PersistedState,
|
||||
store?: MiddlewareAPI,
|
||||
store?: ReduxState,
|
||||
): Promise<PersistedState> => {
|
||||
const defaultPromise = Promise.resolve(persistedState);
|
||||
if (!persistedState) {
|
||||
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
ElementID,
|
||||
Element,
|
||||
ElementSearchResultSet,
|
||||
MiddlewareAPI,
|
||||
PluginClient,
|
||||
FlexColumn,
|
||||
FlexRow,
|
||||
@@ -27,6 +26,7 @@ import {
|
||||
colors,
|
||||
SupportRequestFormManager,
|
||||
constants,
|
||||
ReduxState,
|
||||
} from 'flipper';
|
||||
import Inspector from './Inspector';
|
||||
import ToolbarIcon from './ToolbarIcon';
|
||||
@@ -97,7 +97,7 @@ export default class Layout extends FlipperPlugin<State, any, PersistedState> {
|
||||
allNodes: PersistedState;
|
||||
}>,
|
||||
persistedState: PersistedState | undefined,
|
||||
store: MiddlewareAPI | undefined,
|
||||
store: ReduxState | undefined,
|
||||
): Promise<PersistedState | undefined> => {
|
||||
if (!store) {
|
||||
return persistedState;
|
||||
|
||||
Reference in New Issue
Block a user