From c8506dfc3359502bbe90dbd22ef6f433a61557d9 Mon Sep 17 00:00:00 2001 From: Kirill Chernakov Date: Wed, 25 Dec 2024 17:56:56 +0400 Subject: [PATCH] fix: frontend warnings (#2902) --- .../ui/incident-table-component.tsx | 45 +++++++++---------- .../incident-list/ui/incidents-table.tsx | 11 +++-- keep-ui/next.config.js | 13 ++++++ 3 files changed, 40 insertions(+), 29 deletions(-) diff --git a/keep-ui/features/incident-list/ui/incident-table-component.tsx b/keep-ui/features/incident-list/ui/incident-table-component.tsx index 43c46764c..74d3e9623 100644 --- a/keep-ui/features/incident-list/ui/incident-table-component.tsx +++ b/keep-ui/features/incident-list/ui/incident-table-component.tsx @@ -100,29 +100,28 @@ export const IncidentTableComponent = (props: Props) => { {table.getRowModel().rows.map((row) => ( - <> - - {row.getVisibleCells().map((cell) => { - const { style, className } = - getCommonPinningStylesAndClassNames(cell.column); - return ( - - {flexRender(cell.column.columnDef.cell, cell.getContext())} - - ); - })} - - + + {row.getVisibleCells().map((cell) => { + const { style, className } = getCommonPinningStylesAndClassNames( + cell.column + ); + return ( + + {flexRender(cell.column.columnDef.cell, cell.getContext())} + + ); + })} + ))} diff --git a/keep-ui/features/incident-list/ui/incidents-table.tsx b/keep-ui/features/incident-list/ui/incidents-table.tsx index 8ddf23ddc..c46c619f8 100644 --- a/keep-ui/features/incident-list/ui/incidents-table.tsx +++ b/keep-ui/features/incident-list/ui/incidents-table.tsx @@ -285,7 +285,6 @@ export default function IncidentsTable({ enableSorting: true, enableMultiSort: false, manualSorting: true, - debugTable: true, }); const selectedRowIds = Object.entries( @@ -315,11 +314,11 @@ export default function IncidentsTable({ return; } - if ( - !confirm( - `Are you sure you want to delete ${selectedRowIds.length} incidents? This action cannot be undone.` - ) - ) { + const isConfirmed = confirm( + `Are you sure you want to delete ${selectedRowIds.length} incidents? This action cannot be undone.` + ); + + if (!isConfirmed) { return; } diff --git a/keep-ui/next.config.js b/keep-ui/next.config.js index 82cfd0720..4410d4784 100644 --- a/keep-ui/next.config.js +++ b/keep-ui/next.config.js @@ -24,6 +24,19 @@ const nextConfig = { ); } + // Ignore warnings about critical dependencies, since they are not critical + // https://github.com/getsentry/sentry-javascript/issues/12077#issuecomment-2407569917 + config.ignoreWarnings = [ + ...(config.ignoreWarnings || []), + { + module: /@opentelemetry\/instrumentation/, + message: /Critical dependency/, + }, + { + module: /@prisma\/instrumentation/, + message: /Critical dependency/, + }, + ]; return config; }, transpilePackages: ["next-auth"],