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: frontend warnings #2902

Merged
merged 3 commits into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
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
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
Loading