Skip to content

Commit

Permalink
fix: frontend warnings (#2902)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiryous authored Dec 25, 2024
1 parent 55cb0e5 commit c8506df
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 29 deletions.
45 changes: 22 additions & 23 deletions keep-ui/features/incident-list/ui/incident-table-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,29 +100,28 @@ export const IncidentTableComponent = (props: Props) => {
</TableHead>
<TableBody>
{table.getRowModel().rows.map((row) => (
<>
<TableRow
key={row.id}
className="even:bg-tremor-background-muted even:dark:bg-dark-tremor-background-muted"
>
{row.getVisibleCells().map((cell) => {
const { style, className } =
getCommonPinningStylesAndClassNames(cell.column);
return (
<TableCell
key={cell.id}
style={style}
className={clsx(
className,
cell.column.id === "actions" ? "p-1" : ""
)}
>
{flexRender(cell.column.columnDef.cell, cell.getContext())}
</TableCell>
);
})}
</TableRow>
</>
<TableRow
key={row.id}
className="even:bg-tremor-background-muted even:dark:bg-dark-tremor-background-muted"
>
{row.getVisibleCells().map((cell) => {
const { style, className } = getCommonPinningStylesAndClassNames(
cell.column
);
return (
<TableCell
key={cell.id}
style={style}
className={clsx(
className,
cell.column.id === "actions" ? "p-1" : ""
)}
>
{flexRender(cell.column.columnDef.cell, cell.getContext())}
</TableCell>
);
})}
</TableRow>
))}
</TableBody>
</Table>
Expand Down
11 changes: 5 additions & 6 deletions keep-ui/features/incident-list/ui/incidents-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ export default function IncidentsTable({
enableSorting: true,
enableMultiSort: false,
manualSorting: true,
debugTable: true,
});

const selectedRowIds = Object.entries(
Expand Down Expand Up @@ -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;
}

Expand Down
13 changes: 13 additions & 0 deletions keep-ui/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down

0 comments on commit c8506df

Please sign in to comment.