From f84029c8f26d0df3afaaba75aa325d1cb024bf08 Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Tue, 4 Apr 2023 11:37:59 +0200 Subject: [PATCH] Move SET_IS_JAEGER_ENABLED action to global ones --- src/components/RecentActivity/index.tsx | 8 ++++---- src/components/common/App/index.tsx | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/RecentActivity/index.tsx b/src/components/RecentActivity/index.tsx index bdff8afe1..7522929a5 100644 --- a/src/components/RecentActivity/index.tsx +++ b/src/components/RecentActivity/index.tsx @@ -3,6 +3,7 @@ import { dispatcher } from "../../dispatcher"; import { usePrevious } from "../../hooks/usePrevious"; import { getActions } from "../../utils/getActions"; import { groupBy } from "../../utils/groupBy"; +import { actions as globalActions } from "../common/App"; import { CursorFollower } from "../common/CursorFollower"; import { DigmaLogoFlatIcon } from "../common/icons/DigmaLogoFlatIcon"; import { EnvironmentPanel } from "./EnvironmentPanel"; @@ -32,8 +33,7 @@ const actions = getActions(ACTION_PREFIX, { getData: "GET_DATA", setData: "SET_DATA", goToSpan: "GO_TO_SPAN", - goToTrace: "GO_TO_TRACE", - setIsJaegerEnabled: "SET_IS_JAEGER_ENABLED" + goToTrace: "GO_TO_TRACE" }); const renderNoData = () => { @@ -91,7 +91,7 @@ export const RecentActivity = (props: RecentActivityProps) => { dispatcher.addActionListener(actions.setData, handleRecentActivityData); dispatcher.addActionListener( - actions.setIsJaegerEnabled, + globalActions.setIsJaegerEnabled, handleSetIsJaegerEnabledData ); @@ -103,7 +103,7 @@ export const RecentActivity = (props: RecentActivityProps) => { handleRecentActivityData ); dispatcher.removeActionListener( - actions.setIsJaegerEnabled, + globalActions.setIsJaegerEnabled, handleSetIsJaegerEnabledData ); }; diff --git a/src/components/common/App/index.tsx b/src/components/common/App/index.tsx index cf42f547f..8bbb12cdf 100644 --- a/src/components/common/App/index.tsx +++ b/src/components/common/App/index.tsx @@ -32,7 +32,8 @@ export const actions = getActions(ACTION_PREFIX, { setMainFont: "SET_MAIN_FONT", setCodeFont: "SET_CODE_FONT", openURLInDefaultBrowser: "OPEN_URL_IN_DEFAULT_BROWSER", - sendTrackingEvent: "SEND_TRACKING_EVENT" + sendTrackingEvent: "SEND_TRACKING_EVENT", + setIsJaegerEnabled: "SET_IS_JAEGER_ENABLED" }); export const App = (props: AppProps) => {