Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): incident add a comment uses old API #2291

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions keep-ui/app/incidents/[id]/incident-activity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -59,7 +59,6 @@ export function IncidentActivityChronoItem({ activity }: { activity: any }) {
);
}


export function IncidentActivityChronoItemComment({
incident,
mutator,
Expand All @@ -68,7 +67,7 @@ export function IncidentActivityChronoItemComment({
mutator: KeyedMutator<AuditEvent[]>;
}) {
const [comment, setComment] = useState("");
const apiUrl = getApiURL();
const apiUrl = useApiUrl();
const { data: session } = useSession();

const onSubmit = useCallback(async () => {
Expand Down
Loading