Skip to content

Commit 12d83ae

Browse files
committed
Fix new incident link
1 parent 50cdf4a commit 12d83ae

File tree

1 file changed

+3
-1
lines changed
  • src/components/Agentic/IncidentsContainer/CreateIncidentChatOverlay

1 file changed

+3
-1
lines changed

src/components/Agentic/IncidentsContainer/CreateIncidentChatOverlay/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { fetchEventSource } from "@microsoft/fetch-event-source";
22
import { useEffect, useRef, useState } from "react";
3+
import { useNavigate } from "react-router";
34
import { useAgenticDispatch } from "../../../../containers/Agentic/hooks";
45
import {
56
useGetIncidentAgentEventsQuery,
@@ -29,6 +30,7 @@ export const CreateIncidentChatOverlay = () => {
2930
const abortControllerRef = useRef<AbortController | null>(null);
3031
const [accumulatedData, setAccumulatedData] =
3132
useState<IncidentAgentEvent[]>();
33+
const navigate = useNavigate();
3234

3335
const dispatch = useAgenticDispatch();
3436

@@ -146,7 +148,7 @@ export const CreateIncidentChatOverlay = () => {
146148

147149
const handleIncidentNavigate = (id: string) => {
148150
dispatch(setIsCreateIncidentChatOpen(false));
149-
setIncidentId(id);
151+
void navigate(`/incidents/${id}`);
150152
};
151153

152154
const handleCreateIncidentChatDialogClose = () => {

0 commit comments

Comments
 (0)