mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-27 00:19:55 +03:00
refactor(rtk-query): move preview to containers remove unnecessary computation
This commit is contained in:
parent
692d63eee6
commit
15d8c72c9b
|
@ -7,22 +7,31 @@ import {
|
||||||
SelectorsSource,
|
SelectorsSource,
|
||||||
TabOption,
|
TabOption,
|
||||||
} from '../types';
|
} from '../types';
|
||||||
import { QueryPreviewHeader } from './QueryPreviewHeader';
|
import { QueryPreviewHeader } from '../components/QueryPreviewHeader';
|
||||||
import { QueryPreviewInfo, QueryPreviewInfoProps } from './QueryPreviewInfo';
|
import {
|
||||||
import { QueryPreviewApi, QueryPreviewApiProps } from './QueryPreviewApi';
|
QueryPreviewInfo,
|
||||||
|
QueryPreviewInfoProps,
|
||||||
|
} from '../components/QueryPreviewInfo';
|
||||||
|
import {
|
||||||
|
QueryPreviewApi,
|
||||||
|
QueryPreviewApiProps,
|
||||||
|
} from '../components/QueryPreviewApi';
|
||||||
import {
|
import {
|
||||||
QueryPreviewSubscriptions,
|
QueryPreviewSubscriptions,
|
||||||
QueryPreviewSubscriptionsProps,
|
QueryPreviewSubscriptionsProps,
|
||||||
} from './QueryPreviewSubscriptions';
|
} from '../components/QueryPreviewSubscriptions';
|
||||||
import { QueryPreviewTags, QueryPreviewTagsProps } from './QueryPreviewTags';
|
import {
|
||||||
import { NoRtkQueryApi } from './NoRtkQueryApi';
|
QueryPreviewTags,
|
||||||
|
QueryPreviewTagsProps,
|
||||||
|
} from '../components/QueryPreviewTags';
|
||||||
|
import { NoRtkQueryApi } from '../components/NoRtkQueryApi';
|
||||||
import { InspectorSelectors } from '../selectors';
|
import { InspectorSelectors } from '../selectors';
|
||||||
import { StylingFunction } from 'react-base16-styling';
|
import { StylingFunction } from 'react-base16-styling';
|
||||||
import { mapProps } from '../containers/mapProps';
|
import { mapProps } from './mapProps';
|
||||||
import {
|
import {
|
||||||
QueryPreviewActions,
|
QueryPreviewActions,
|
||||||
QueryPreviewActionsProps,
|
QueryPreviewActionsProps,
|
||||||
} from './QueryPreviewActions';
|
} from '../components/QueryPreviewActions';
|
||||||
|
|
||||||
export interface QueryPreviewProps<S = unknown> {
|
export interface QueryPreviewProps<S = unknown> {
|
||||||
readonly selectedTab: QueryPreviewTabs;
|
readonly selectedTab: QueryPreviewTabs;
|
|
@ -17,7 +17,7 @@ import {
|
||||||
} from '../reducers';
|
} from '../reducers';
|
||||||
import { QueryList } from '../components/QueryList';
|
import { QueryList } from '../components/QueryList';
|
||||||
import { QueryForm } from '../components/QueryForm';
|
import { QueryForm } from '../components/QueryForm';
|
||||||
import { QueryPreview } from '../components/QueryPreview';
|
import { QueryPreview } from './QueryPreview';
|
||||||
|
|
||||||
type ForwardedMonitorProps<S, A extends Action<unknown>> = Pick<
|
type ForwardedMonitorProps<S, A extends Action<unknown>> = Pick<
|
||||||
LiftedState<S, A, RtkQueryMonitorState>,
|
LiftedState<S, A, RtkQueryMonitorState>,
|
||||||
|
@ -124,9 +124,6 @@ class RtkQueryInspector<S, A extends Action<unknown>> extends PureComponent<
|
||||||
|
|
||||||
const hasNoApi = apiStates == null;
|
const hasNoApi = apiStates == null;
|
||||||
|
|
||||||
const actionsOfCurrentQuery =
|
|
||||||
this.selectors.selectActionsOfCurrentQuery(selectorsSource);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
ref={this.inspectorRef}
|
ref={this.inspectorRef}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user