wire up incidents table
This commit is contained in:
1 parent
87255071f4
commit
6b67f4977f
3 files changed
+71
-13
No files matched your search
@@ -5,6 +5,7 @@ import {
|
||||
SummaryCardLatestIncidents,
|
||||
SummaryCardStats,
|
||||
} from "@/Pages/Incidents/Components/SummaryCard";
|
||||
import { IncidentsTable } from "@/Pages/Incidents/Components/IncidentTable";
|
||||
|
||||
import { useGet } from "@/Hooks/UseApi";
|
||||
import { useState, useEffect, useMemo } from "react";
|
||||
@@ -96,21 +97,23 @@ const IncidentsPage = () => {
|
||||
void setFilter;
|
||||
void dateRange;
|
||||
void setDateRange;
|
||||
void page;
|
||||
void setPage;
|
||||
void rowsPerPage;
|
||||
void setRowsPerPage;
|
||||
void isLoadingIncidents;
|
||||
void isLoadingMonitors;
|
||||
void isLoadingSummary;
|
||||
void refetchIncidents;
|
||||
void refetchSummary;
|
||||
void monitorLookup;
|
||||
void incidents;
|
||||
void incidentsCount;
|
||||
void summaryData;
|
||||
void networkError;
|
||||
|
||||
const handleOpenDetails = (incidentId: string) => {
|
||||
console.log("Open details for incident:", incidentId);
|
||||
};
|
||||
|
||||
const handleResolve = (incidentId: string) => {
|
||||
console.log("Resolve incident:", incidentId);
|
||||
};
|
||||
|
||||
return (
|
||||
<BasePage>
|
||||
<Stack
|
||||
@@ -124,6 +127,17 @@ const IncidentsPage = () => {
|
||||
/>
|
||||
<SummaryCardStats summary={summaryData} />
|
||||
</Stack>
|
||||
<IncidentsTable
|
||||
incidents={incidents}
|
||||
monitors={monitorsData ?? undefined}
|
||||
incidentsCount={incidentsCount}
|
||||
page={page}
|
||||
setPage={setPage}
|
||||
rowsPerPage={rowsPerPage}
|
||||
setRowsPerPage={setRowsPerPage}
|
||||
onOpenDetails={handleOpenDetails}
|
||||
onResolve={handleResolve}
|
||||
/>
|
||||
</BasePage>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user