From 7290eb03d7888e21fda1e967aa58453311b0b5b3 Mon Sep 17 00:00:00 2001 From: Shahar Glazner Date: Thu, 24 Oct 2024 19:33:18 +0300 Subject: [PATCH] fix(ui): incident add a comment uses old API (#2291) --- keep-ui/app/incidents/[id]/incident-activity.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/keep-ui/app/incidents/[id]/incident-activity.tsx b/keep-ui/app/incidents/[id]/incident-activity.tsx index 2ab11e50f..9cdf91f26 100644 --- a/keep-ui/app/incidents/[id]/incident-activity.tsx +++ b/keep-ui/app/incidents/[id]/incident-activity.tsx @@ -15,7 +15,7 @@ import { import { AuditEvent, useAlerts } from "@/utils/hooks/useAlerts"; import Loading from "@/app/loading"; import { useCallback, useState, useEffect } from "react"; -import { getApiURL } from "@/utils/apiUrl"; +import { useApiUrl } from "@/utils/hooks/useConfig"; import { useSession } from "next-auth/react"; import { KeyedMutator } from "swr"; import { toast } from "react-toastify"; @@ -59,7 +59,6 @@ export function IncidentActivityChronoItem({ activity }: { activity: any }) { ); } - export function IncidentActivityChronoItemComment({ incident, mutator, @@ -68,7 +67,7 @@ export function IncidentActivityChronoItemComment({ mutator: KeyedMutator; }) { const [comment, setComment] = useState(""); - const apiUrl = getApiURL(); + const apiUrl = useApiUrl(); const { data: session } = useSession(); const onSubmit = useCallback(async () => {