feat: Add type inference for redux's useSelector hook (#18257)

Add type inference for redux's useSelector hook

- Used module augmentation of TS to override the default root state interface
- Replaced custom hook with redux's useSelector
- It brings consistency as at a lot of places in the codebase we're using only the redux's useSelector
This commit is contained in:
Ravi Kumar Prasad 2022-11-28 13:43:17 +05:30 committed by GitHub
parent 78a37e827c
commit eb0c93e0e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 44 additions and 60 deletions

View File

@ -1,5 +1,5 @@
import React, { memo } from "react"; import React, { memo } from "react";
import { useDispatch } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import styled from "styled-components"; import styled from "styled-components";
import { generateReactKey } from "utils/generators"; import { generateReactKey } from "utils/generators";
import { Collapsible } from "."; import { Collapsible } from ".";
@ -14,7 +14,6 @@ import {
} from "@appsmith/constants/messages"; } from "@appsmith/constants/messages";
import { SuggestedWidget } from "api/ActionAPI"; import { SuggestedWidget } from "api/ActionAPI";
import { useSelector } from "store";
import { getDataTree } from "selectors/dataTreeSelectors"; import { getDataTree } from "selectors/dataTreeSelectors";
import { getWidgets } from "sagas/selectors"; import { getWidgets } from "sagas/selectors";
import { getNextWidgetName } from "sagas/WidgetOperationUtils"; import { getNextWidgetName } from "sagas/WidgetOperationUtils";

View File

@ -1,7 +1,6 @@
import { Icon, IconSize } from "design-system"; import { Icon, IconSize } from "design-system";
import React from "react"; import React from "react";
import { useDispatch } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { useSelector } from "store";
import styled from "styled-components"; import styled from "styled-components";
import DebuggerTabs from "./DebuggerTabs"; import DebuggerTabs from "./DebuggerTabs";
import { AppState } from "@appsmith/reducers"; import { AppState } from "@appsmith/reducers";

View File

@ -11,7 +11,7 @@ import {
getJSCollections, getJSCollections,
getPlugins, getPlugins,
} from "selectors/entitiesSelector"; } from "selectors/entitiesSelector";
import { useSelector } from "store"; import { useSelector } from "react-redux";
import { EventLocation } from "utils/AnalyticsUtil"; import { EventLocation } from "utils/AnalyticsUtil";
import history from "utils/history"; import history from "utils/history";
import { import {

View File

@ -21,7 +21,7 @@ import {
setGlobalSearchFilterContext, setGlobalSearchFilterContext,
unsetEvaluatedArgument, unsetEvaluatedArgument,
} from "actions/globalSearchActions"; } from "actions/globalSearchActions";
import { useSelector } from "store"; import { useSelector } from "react-redux";
import { AppState } from "@appsmith/reducers"; import { AppState } from "@appsmith/reducers";
import ReadOnlyEditor from "../ReadOnlyEditor"; import ReadOnlyEditor from "../ReadOnlyEditor";
import copy from "copy-to-clipboard"; import copy from "copy-to-clipboard";

View File

@ -15,7 +15,7 @@ import {
import { ReactComponent as ColorPickerIcon } from "assets/icons/control/color-picker.svg"; import { ReactComponent as ColorPickerIcon } from "assets/icons/control/color-picker.svg";
import { debounce, get } from "lodash"; import { debounce, get } from "lodash";
import { Colors } from "constants/Colors"; import { Colors } from "constants/Colors";
import { useSelector } from "store"; import { useSelector } from "react-redux";
import { getSelectedAppThemeProperties } from "selectors/appThemingSelectors"; import { getSelectedAppThemeProperties } from "selectors/appThemingSelectors";
import { import {
colorsPropertyName, colorsPropertyName,

8
app/client/src/config.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
import "react-redux";
import { AppState } from "@appsmith/reducers";
declare module "react-redux" {
// We want the DefaultRootState interface to be the AppState interface
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface DefaultRootState extends AppState {}
}

View File

@ -1,6 +1,5 @@
import React, { useState, useMemo, useEffect } from "react"; import React, { useState, useMemo, useEffect } from "react";
import { useDispatch } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { useSelector } from "store";
import { getUserApplicationsWorkspaces } from "selectors/applicationSelectors"; import { getUserApplicationsWorkspaces } from "selectors/applicationSelectors";
import { import {
isPermitted, isPermitted,

View File

@ -1,7 +1,6 @@
import React, { ReactNode, useCallback, useEffect, useState } from "react"; import React, { ReactNode, useCallback, useEffect, useState } from "react";
import styled, { useTheme } from "styled-components"; import styled, { useTheme } from "styled-components";
import { useSelector } from "store"; import { useDispatch, useSelector } from "react-redux";
import { useDispatch } from "react-redux";
import { import {
importApplication, importApplication,
setWorkspaceIdForImport, setWorkspaceIdForImport,

View File

@ -10,8 +10,7 @@ import {
Variant, Variant,
} from "design-system"; } from "design-system";
import { StyledDialog } from "./ForkModalStyles"; import { StyledDialog } from "./ForkModalStyles";
import { useSelector } from "store"; import { useDispatch, useSelector } from "react-redux";
import { useDispatch } from "react-redux";
import { importApplication } from "actions/applicationActions"; import { importApplication } from "actions/applicationActions";
import { IMPORT_APPLICATION_MODAL_TITLE } from "@appsmith/constants/messages"; import { IMPORT_APPLICATION_MODAL_TITLE } from "@appsmith/constants/messages";
import { getIsImportingApplication } from "selectors/applicationSelectors"; import { getIsImportingApplication } from "selectors/applicationSelectors";

View File

@ -1,7 +1,7 @@
import log from "loglevel"; import log from "loglevel";
import * as Sentry from "@sentry/react"; import * as Sentry from "@sentry/react";
import styled from "styled-components"; import styled from "styled-components";
import store, { useSelector } from "store"; import store from "store";
import { CanvasWidgetStructure } from "widgets/constants"; import { CanvasWidgetStructure } from "widgets/constants";
import WidgetFactory from "utils/WidgetFactory"; import WidgetFactory from "utils/WidgetFactory";
import React, { memo, useCallback, useEffect } from "react"; import React, { memo, useCallback, useEffect } from "react";
@ -12,7 +12,7 @@ import CanvasMultiPointerArena, {
import { throttle } from "lodash"; import { throttle } from "lodash";
import { RenderModes } from "constants/WidgetConstants"; import { RenderModes } from "constants/WidgetConstants";
import { isMultiplayerEnabledForUser as isMultiplayerEnabledForUserSelector } from "selectors/appCollabSelectors"; import { isMultiplayerEnabledForUser as isMultiplayerEnabledForUserSelector } from "selectors/appCollabSelectors";
import { useDispatch } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { initPageLevelSocketConnection } from "actions/websocketActions"; import { initPageLevelSocketConnection } from "actions/websocketActions";
import { collabShareUserPointerEvent } from "actions/appCollabActions"; import { collabShareUserPointerEvent } from "actions/appCollabActions";
import { getIsPageLevelSocketConnected } from "selectors/websocketSelectors"; import { getIsPageLevelSocketConnected } from "selectors/websocketSelectors";

View File

@ -1,4 +1,5 @@
import React, { useCallback, memo, useMemo } from "react"; import React, { useCallback, memo, useMemo } from "react";
import { useSelector } from "react-redux";
import Entity, { EntityClassNames } from "../Entity"; import Entity, { EntityClassNames } from "../Entity";
import ActionEntityContextMenu from "./ActionEntityContextMenu"; import ActionEntityContextMenu from "./ActionEntityContextMenu";
import history from "utils/history"; import history from "utils/history";
@ -6,7 +7,6 @@ import { saveActionName } from "actions/pluginActionActions";
import PerformanceTracker, { import PerformanceTracker, {
PerformanceTransactionName, PerformanceTransactionName,
} from "utils/PerformanceTracker"; } from "utils/PerformanceTracker";
import { useSelector } from "store";
import { getCurrentPageId } from "selectors/editorSelectors"; import { getCurrentPageId } from "selectors/editorSelectors";
import { getAction, getPlugins } from "selectors/entitiesSelector"; import { getAction, getPlugins } from "selectors/entitiesSelector";
import { Action, PluginType } from "entities/Action"; import { Action, PluginType } from "entities/Action";

View File

@ -5,7 +5,7 @@ import {
} from "./hooks"; } from "./hooks";
import { Datasource } from "entities/Datasource"; import { Datasource } from "entities/Datasource";
import ExplorerDatasourceEntity from "./Datasources/DatasourceEntity"; import ExplorerDatasourceEntity from "./Datasources/DatasourceEntity";
import { useSelector } from "store"; import { useSelector } from "react-redux";
import { import {
getCurrentApplicationId, getCurrentApplicationId,
getCurrentPageId, getCurrentPageId,

View File

@ -2,8 +2,7 @@ import React from "react";
import { Icon } from "@blueprintjs/core"; import { Icon } from "@blueprintjs/core";
import { Button, Category, Text, TextType } from "design-system"; import { Button, Category, Text, TextType } from "design-system";
import styled from "styled-components"; import styled from "styled-components";
import { useDispatch } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { useSelector } from "store";
import { import {
getCanvasWidgets, getCanvasWidgets,
getDatasources, getDatasources,

View File

@ -22,7 +22,7 @@ import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants";
import { INTEGRATION_TABS } from "constants/routes"; import { INTEGRATION_TABS } from "constants/routes";
import { ASSETS_CDN_URL } from "constants/ThirdPartyConstants"; import { ASSETS_CDN_URL } from "constants/ThirdPartyConstants";
import React from "react"; import React from "react";
import { useDispatch } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { import {
getCurrentApplicationId, getCurrentApplicationId,
@ -34,7 +34,6 @@ import {
getPageActions, getPageActions,
} from "selectors/entitiesSelector"; } from "selectors/entitiesSelector";
import { getFirstTimeUserOnboardingModal } from "selectors/onboardingSelectors"; import { getFirstTimeUserOnboardingModal } from "selectors/onboardingSelectors";
import { useSelector } from "store";
import styled from "styled-components"; import styled from "styled-components";
import AnalyticsUtil from "utils/AnalyticsUtil"; import AnalyticsUtil from "utils/AnalyticsUtil";
import history from "utils/history"; import history from "utils/history";

View File

@ -1,11 +1,11 @@
import React from "react"; import React from "react";
import { ReactNode } from "react"; import { ReactNode } from "react";
import { useSelector } from "react-redux";
import { import {
forceShowContentSelector, forceShowContentSelector,
getCurrentStep, getCurrentStep,
inGuidedTour, inGuidedTour,
} from "selectors/onboardingSelectors"; } from "selectors/onboardingSelectors";
import { useSelector } from "store";
type BoxedProps = { type BoxedProps = {
alternative?: JSX.Element; alternative?: JSX.Element;

View File

@ -1,3 +1,4 @@
import { useSelector } from "react-redux";
import { import {
enableGuidedTour, enableGuidedTour,
toggleShowDeviationDialog, toggleShowDeviationDialog,
@ -16,7 +17,6 @@ import {
showDeviatingDialogSelector, showDeviatingDialogSelector,
showEndTourDialogSelector, showEndTourDialogSelector,
} from "selectors/onboardingSelectors"; } from "selectors/onboardingSelectors";
import { useSelector } from "store";
import styled from "styled-components"; import styled from "styled-components";
import AnalyticsUtil from "utils/AnalyticsUtil"; import AnalyticsUtil from "utils/AnalyticsUtil";

View File

@ -1,12 +1,11 @@
import classNames from "classnames"; import classNames from "classnames";
import { useDispatch } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import React, { useMemo, useCallback } from "react"; import React, { useMemo, useCallback } from "react";
import { import {
getCurrentApplicationId, getCurrentApplicationId,
getCurrentApplicationLayout, getCurrentApplicationLayout,
} from "selectors/editorSelectors"; } from "selectors/editorSelectors";
import { useSelector } from "store";
import { Colors } from "constants/Colors"; import { Colors } from "constants/Colors";
import { import {
AppLayoutConfig, AppLayoutConfig,

View File

@ -3,7 +3,7 @@ import React from "react";
import styled from "styled-components"; import styled from "styled-components";
import { ReactComponent as CloudyIcon } from "assets/icons/ads/cloudy-line.svg"; import { ReactComponent as CloudyIcon } from "assets/icons/ads/cloudy-line.svg";
import { ReactComponent as RightArrow } from "assets/icons/ads/arrow-right-line.svg"; import { ReactComponent as RightArrow } from "assets/icons/ads/arrow-right-line.svg";
import { useSelector } from "store"; import { useSelector } from "react-redux";
import { import {
getCurrentPageId, getCurrentPageId,
getApplicationLastDeployedAt, getApplicationLastDeployedAt,

View File

@ -1,6 +1,6 @@
import React, { useEffect } from "react"; import React, { useEffect } from "react";
import { useSelector } from "react-redux";
import styled from "constants/DefaultTheme"; import styled from "constants/DefaultTheme";
import { useSelector } from "store";
import { import {
getConnectingErrorDocUrl, getConnectingErrorDocUrl,
getGitConnectError, getGitConnectError,

View File

@ -18,19 +18,12 @@ const setting: Setting = {
isDisabled: buttonIsDisabled, isDisabled: buttonIsDisabled,
}; };
const dispatch = jest.fn(); const dispatch = jest.fn();
const settings = {};
jest.mock("react-redux", () => { jest.mock("react-redux", () => {
const originalModule = jest.requireActual("react-redux"); const originalModule = jest.requireActual("react-redux");
return { return {
...originalModule, ...originalModule,
useDispatch: () => dispatch, useDispatch: () => dispatch,
};
});
const settings = {};
jest.mock("store", () => {
const store = jest.requireActual("store").default;
return {
...store,
useSelector: () => settings, useSelector: () => settings,
}; };
}); });

View File

@ -1,9 +1,8 @@
import { SETTINGS_FORM_NAME } from "@appsmith/constants/forms"; import { SETTINGS_FORM_NAME } from "@appsmith/constants/forms";
import React from "react"; import React from "react";
import { Button, Category } from "design-system"; import { Button, Category } from "design-system";
import { useDispatch } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { getFormValues } from "redux-form"; import { getFormValues } from "redux-form";
import { useSelector } from "store";
import styled from "styled-components"; import styled from "styled-components";
import { FormGroup, SettingComponentProps } from "./Common"; import { FormGroup, SettingComponentProps } from "./Common";

View File

@ -1,7 +1,7 @@
import { Text, TextType } from "design-system"; import { Text, TextType } from "design-system";
import React from "react"; import React from "react";
import { getSettings } from "selectors/settingsSelectors"; import { getSettings } from "selectors/settingsSelectors";
import { useSelector } from "store"; import { useSelector } from "react-redux";
import styled from "styled-components"; import styled from "styled-components";
import { FormGroup, SettingComponentProps } from "./Common"; import { FormGroup, SettingComponentProps } from "./Common";

View File

@ -11,7 +11,7 @@ import Text from "./Text";
import Button from "./Button"; import Button from "./Button";
import { getFormValues } from "redux-form"; import { getFormValues } from "redux-form";
import { SETTINGS_FORM_NAME } from "@appsmith/constants/forms"; import { SETTINGS_FORM_NAME } from "@appsmith/constants/forms";
import { useSelector } from "store"; import { useSelector } from "react-redux";
import { import {
createMessage, createMessage,
REDIRECT_URL_TOOLTIP, REDIRECT_URL_TOOLTIP,

View File

@ -11,7 +11,7 @@ import {
getIsRestartFailed, getIsRestartFailed,
getRestartingState, getRestartingState,
} from "selectors/settingsSelectors"; } from "selectors/settingsSelectors";
import { useSelector } from "store"; import { useSelector } from "react-redux";
import styled from "styled-components"; import styled from "styled-components";
import { import {
createMessage, createMessage,

View File

@ -4,7 +4,6 @@ import {
GridDefaults, GridDefaults,
MAIN_CONTAINER_WIDGET_ID, MAIN_CONTAINER_WIDGET_ID,
} from "constants/WidgetConstants"; } from "constants/WidgetConstants";
import { useSelector } from "store";
import { AppState } from "@appsmith/reducers"; import { AppState } from "@appsmith/reducers";
import { getSelectedWidgets } from "selectors/ui"; import { getSelectedWidgets } from "selectors/ui";
import { getOccupiedSpacesWhileMoving } from "selectors/editorSelectors"; import { getOccupiedSpacesWhileMoving } from "selectors/editorSelectors";
@ -20,7 +19,7 @@ import { DropTargetContext } from "components/editorComponents/DropTargetCompone
import { isEmpty } from "lodash"; import { isEmpty } from "lodash";
import equal from "fast-deep-equal/es6"; import equal from "fast-deep-equal/es6";
import { CanvasDraggingArenaProps } from "pages/common/CanvasArenas/CanvasDraggingArena"; import { CanvasDraggingArenaProps } from "pages/common/CanvasArenas/CanvasDraggingArena";
import { useDispatch } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants";
import { EditorContext } from "components/editorComponents/EditorContextProvider"; import { EditorContext } from "components/editorComponents/EditorContextProvider";
import { useWidgetSelection } from "utils/hooks/useWidgetSelection"; import { useWidgetSelection } from "utils/hooks/useWidgetSelection";

View File

@ -2,7 +2,7 @@ import { Popover, PopoverInteractionKind, Position } from "@blueprintjs/core";
import UserApi from "@appsmith/api/UserApi"; import UserApi from "@appsmith/api/UserApi";
import React, { useMemo } from "react"; import React, { useMemo } from "react";
import { getCurrentUser } from "selectors/usersSelectors"; import { getCurrentUser } from "selectors/usersSelectors";
import { useSelector } from "store"; import { useSelector } from "react-redux";
import styled from "styled-components"; import styled from "styled-components";
import ProfileImage from "./ProfileImage"; import ProfileImage from "./ProfileImage";
import { ScrollIndicator } from "design-system"; import { ScrollIndicator } from "design-system";

View File

@ -13,9 +13,8 @@ import { requiresAuth } from "pages/UserAuth/requiresAuthHOC";
import React from "react"; import React from "react";
import { useCallback } from "react"; import { useCallback } from "react";
import { useEffect } from "react"; import { useEffect } from "react";
import { useDispatch } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { getCurrentUser } from "selectors/usersSelectors"; import { getCurrentUser } from "selectors/usersSelectors";
import { useSelector } from "store";
import { getIsSafeRedirectURL } from "utils/helpers"; import { getIsSafeRedirectURL } from "utils/helpers";
import history from "utils/history"; import history from "utils/history";
import PerformanceTracker, { import PerformanceTracker, {

View File

@ -1,9 +1,5 @@
import { reduxBatch } from "@manaflair/redux-batch"; import { reduxBatch } from "@manaflair/redux-batch";
import { createStore, applyMiddleware, compose } from "redux"; import { createStore, applyMiddleware, compose } from "redux";
import {
useSelector as useReduxSelector,
TypedUseSelectorHook,
} from "react-redux";
import appReducer, { AppState } from "@appsmith/reducers"; import appReducer, { AppState } from "@appsmith/reducers";
import createSagaMiddleware from "redux-saga"; import createSagaMiddleware from "redux-saga";
import { rootSaga } from "@appsmith/sagas"; import { rootSaga } from "@appsmith/sagas";
@ -50,5 +46,3 @@ export const testStore = (initialState: Partial<AppState>) =>
); );
sagaMiddleware.run(rootSaga); sagaMiddleware.run(rootSaga);
export const useSelector: TypedUseSelectorHook<AppState> = useReduxSelector;

View File

@ -1,9 +1,9 @@
import { AppState } from "@appsmith/reducers"; import { AppState } from "@appsmith/reducers";
import { import {
previewModeSelector,
snipingModeSelector, snipingModeSelector,
previewModeSelector,
} from "selectors/editorSelectors"; } from "selectors/editorSelectors";
import { useSelector } from "store"; import { useSelector } from "react-redux";
export const useAllowEditorDragToSelect = () => { export const useAllowEditorDragToSelect = () => {
// This state tells us whether a `ResizableComponent` is resizing // This state tells us whether a `ResizableComponent` is resizing

View File

@ -5,7 +5,7 @@ import { AppState } from "@appsmith/reducers";
import { APP_MODE } from "entities/App"; import { APP_MODE } from "entities/App";
import { getWidget } from "sagas/selectors"; import { getWidget } from "sagas/selectors";
import { getAppMode } from "selectors/applicationSelectors"; import { getAppMode } from "selectors/applicationSelectors";
import { useSelector } from "store"; import { useSelector } from "react-redux";
import { updateWidgetMetaPropAndEval } from "actions/metaActions"; import { updateWidgetMetaPropAndEval } from "actions/metaActions";
import WidgetFactory from "utils/WidgetFactory"; import WidgetFactory from "utils/WidgetFactory";

View File

@ -1,5 +1,5 @@
import { getIsPropertyPaneVisible } from "selectors/propertyPaneSelectors"; import { getIsPropertyPaneVisible } from "selectors/propertyPaneSelectors";
import { useSelector } from "store"; import { useSelector } from "react-redux";
import { AppState } from "@appsmith/reducers"; import { AppState } from "@appsmith/reducers";
import { useWidgetSelection } from "./useWidgetSelection"; import { useWidgetSelection } from "./useWidgetSelection";
import React, { ReactNode, useCallback } from "react"; import React, { ReactNode, useCallback } from "react";

View File

@ -4,7 +4,7 @@ import { Layers } from "constants/Layers";
import { useMemo } from "react"; import { useMemo } from "react";
import { AppState } from "@appsmith/reducers"; import { AppState } from "@appsmith/reducers";
import { isWidgetSelected } from "selectors/widgetSelectors"; import { isWidgetSelected } from "selectors/widgetSelectors";
import { useSelector } from "store"; import { useSelector } from "react-redux";
export const usePositionedContainerZIndex = ( export const usePositionedContainerZIndex = (
props: PositionedContainerProps, props: PositionedContainerProps,

View File

@ -26,7 +26,7 @@ import {
} from "components/constants"; } from "components/constants";
import { SupportedLayouts } from "reducers/entityReducers/pageListReducer"; import { SupportedLayouts } from "reducers/entityReducers/pageListReducer";
import { getCurrentApplicationLayout } from "selectors/editorSelectors"; import { getCurrentApplicationLayout } from "selectors/editorSelectors";
import { useSelector } from "store"; import { useSelector } from "react-redux";
import { Colors } from "constants/Colors"; import { Colors } from "constants/Colors";
import { import {
getBrowserInfo, getBrowserInfo,

View File

@ -10,7 +10,7 @@ import { Button, Icon, Menu, MenuItem, Position } from "@blueprintjs/core";
import { SupportedLayouts } from "reducers/entityReducers/pageListReducer"; import { SupportedLayouts } from "reducers/entityReducers/pageListReducer";
import { ReactComponent as CameraOfflineIcon } from "assets/icons/widget/camera/camera-offline.svg"; import { ReactComponent as CameraOfflineIcon } from "assets/icons/widget/camera/camera-offline.svg";
import { getCurrentApplicationLayout } from "selectors/editorSelectors"; import { getCurrentApplicationLayout } from "selectors/editorSelectors";
import { useSelector } from "store"; import { useSelector } from "react-redux";
import log from "loglevel"; import log from "loglevel";
import { Popover2 } from "@blueprintjs/popover2"; import { Popover2 } from "@blueprintjs/popover2";
import Interweave from "interweave"; import Interweave from "interweave";
@ -78,7 +78,7 @@ const CodeScannerGlobalStyles = createGlobalStyle<{
right: -36px; right: -36px;
} }
} }
@keyframes scan { @keyframes scan {
from {top: 0%} from {top: 0%}
to {top: calc(100% - 4px);} to {top: calc(100% - 4px);}

View File

@ -3,7 +3,7 @@ import styled from "styled-components";
import { hexToRgba } from "widgets/WidgetUtils"; import { hexToRgba } from "widgets/WidgetUtils";
import { ComponentProps } from "widgets/BaseComponent"; import { ComponentProps } from "widgets/BaseComponent";
import { useSelector } from "store"; import { useSelector } from "react-redux";
import { getWidgetPropsForPropertyPane } from "selectors/propertyPaneSelectors"; import { getWidgetPropsForPropertyPane } from "selectors/propertyPaneSelectors";
import { getAppMode } from "selectors/applicationSelectors"; import { getAppMode } from "selectors/applicationSelectors";
import { APP_MODE } from "entities/App"; import { APP_MODE } from "entities/App";