File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { PLUGIN_EVENTS } from "../../pluginEvents";
1111import { useConfigSelector } from "../../store/config/useConfigSelector" ;
1212import { useStore } from "../../store/useStore" ;
1313import { trackingEvents as globalTrackingEvents } from "../../trackingEvents" ;
14+ import { isString } from "../../typeGuards/isString" ;
1415import { isUndefined } from "../../typeGuards/isUndefined" ;
1516import type { SendPluginEventPayload } from "../../types" ;
1617import { ScopeChangeEvent } from "../../types" ;
@@ -69,10 +70,13 @@ const getUrlToNavigateFromRestApiCall = (scope: Scope): string | undefined => {
6970 }
7071
7172 if ( ! Object . values ( TAB_IDS ) . includes ( scope . context . payload . targetTab ) ) {
72- return `/ ${ scope . context . payload . targetTab } ` ;
73+ return ;
7374 }
7475
75- return `/${ scope . context . payload . targetTab } ` ;
76+ const tab = scope . context . payload . targetTab ;
77+ const path = scope . context . payload . targetTabPath ;
78+
79+ return `/${ [ tab , path ] . filter ( isString ) . join ( "/" ) } ` ;
7680} ;
7781
7882export const Main = ( ) => {
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ export interface ScopeWithCustomProtocolLinkContext
9797 event : ScopeChangeEvent ;
9898 payload : {
9999 targetTab ?: string ;
100+ targetTabPath ?: string ;
100101 } ;
101102 } ;
102103}
You can’t perform that action at this time.
0 commit comments