File tree 1 file changed +7
-0
lines changed
src/application/pages/connectors
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 8
8
redirect ,
9
9
useLoaderData ,
10
10
useMatch ,
11
+ useNavigate ,
11
12
useOutletContext ,
12
13
} from "react-router-dom" ;
13
14
import { CodeBlock } from "../../components/CodeBlock" ;
@@ -18,6 +19,7 @@ import { Breadcrumb } from "../../components/Breadcrumb";
18
19
import { BreadcrumbItem } from "../../components/BreadcrumbItem" ;
19
20
import { Heading } from "../../components/Heading" ;
20
21
import { BreadcrumbLink } from "../../components/BreacrumbLink" ;
22
+ import { useActorEvent } from "../../hooks/useActorEvent" ;
21
23
22
24
export function loader ( { params } : LoaderFunctionArgs ) {
23
25
const request = connectorsRequestsVar ( ) . find (
@@ -37,6 +39,7 @@ export function Route() {
37
39
Response
38
40
> ;
39
41
const match = useMatch ( "/connectors/:operationId/requests/:requestId" ) ;
42
+ const navigate = useNavigate ( ) ;
40
43
41
44
const selectedRequest = match
42
45
? request . debuggingResult . data . find (
@@ -48,6 +51,10 @@ export function Route() {
48
51
? new URL ( selectedRequest . request . url )
49
52
: null ;
50
53
54
+ useActorEvent ( "pageNavigated" , ( ) => {
55
+ navigate ( "/connectors" ) ;
56
+ } ) ;
57
+
51
58
return (
52
59
< >
53
60
< SidebarLayout . Main className = "!overflow-auto flex flex-col p-4 gap-4" >
You can’t perform that action at this time.
0 commit comments