Skip to content
This repository was archived by the owner on Jul 8, 2025. It is now read-only.

Commit 2a742d8

Browse files
committed
Merge branch 'main' into alerts-table-refactor
2 parents 3a778b2 + 646ed5a commit 2a742d8

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/components/AlertsTable.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { sanitizeQuestionPrompt, parsingPromptText } from "@/lib/utils";
2020
import { Search } from "lucide-react";
2121
import { useAlertSearch } from "@/hooks/useAlertSearch";
2222
import { useCallback } from "react";
23-
import { useSearchParams } from "react-router-dom";
23+
import { useNavigate, useSearchParams } from "react-router-dom";
2424
import { useFilteredAlerts } from "@/hooks/useAlertsData";
2525
import { useClientSidePagination } from "@/hooks/useClientSidePagination";
2626

@@ -60,6 +60,7 @@ export function AlertsTable() {
6060
nextPage,
6161
prevPage,
6262
} = useAlertSearch();
63+
const navigate = useNavigate();
6364
const [searchParams, setSearchParams] = useSearchParams();
6465
const { data: filteredAlerts = [] } = useFilteredAlerts();
6566

@@ -157,7 +158,13 @@ export function AlertsTable() {
157158
</TableHeader>
158159
<TableBody>
159160
{dataView.map((alert) => (
160-
<Row key={alert.alert_id} className="h-20">
161+
<Row
162+
key={alert.alert_id}
163+
className="h-20"
164+
onAction={() =>
165+
navigate(`/prompt/${alert.conversation.chat_id}`)
166+
}
167+
>
161168
<Cell className="truncate">
162169
{formatDistanceToNow(new Date(alert.timestamp), {
163170
addSuffix: true,

0 commit comments

Comments
 (0)