Skip to content

Commit 14552e4

Browse files
committed
Update to eslint 9.39.2, fix React HTML warnings
Signed-off-by: Michael Edgar <medgar@redhat.com>
1 parent 3d00cc8 commit 14552e4

File tree

5 files changed

+242
-132
lines changed

5 files changed

+242
-132
lines changed

ui/components/MessagesTable/MessagesTableSkeleton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ export function MessagesTableSkeleton({
5252
columns={columns}
5353
data={undefined}
5454
expectedLength={typeof filterLimit === "number" ? filterLimit : 50}
55-
renderCell={() => <div></div>}
56-
renderHeader={() => <div></div>}
55+
renderCell={({ Td, key }) => <Td key={key}></Td>}
56+
renderHeader={({ Th, key }) => <Th key={key}></Th>}
5757
/>
5858
</PageSection>
5959
);

ui/components/Table/TableSkeleton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Skeleton } from "@/libs/patternfly/react-core";
2-
import { Td, Tr } from "@/libs/patternfly/react-table";
2+
import { Td, Tr, Tbody } from "@/libs/patternfly/react-table";
33
import { useTranslations } from "next-intl";
44

55
type Props = {
@@ -26,5 +26,5 @@ export function TableSkeleton({ columns, rows, getTd = () => Td }: Props) {
2626
const skeletonRows = new Array(rows)
2727
.fill(0)
2828
.map((_, index) => <Tr key={`row_${index}`}>{skeletonCells}</Tr>);
29-
return <>{skeletonRows}</>;
29+
return <Tbody>{skeletonRows}</Tbody>;
3030
}

ui/middleware.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,20 @@ const protectedPathnameRegex = new RegExp(
4343
);
4444

4545
export default async function middleware(req: NextRequest) {
46+
const searchParams = req.nextUrl.searchParams;
47+
const requestPath = req.nextUrl.pathname;
48+
49+
if (requestPath === "/config") {
50+
log.warn({ url: req.nextUrl }, "Processing unexpected request for /config in middleware");
51+
return NextResponse.next(); // Allow access without authentication
52+
}
53+
4654
/*
4755
* Next.js middleware doesn't support reading files, so here we make a (cached)
4856
* call to the /config endpoint within the same application :(
4957
*/
5058
const configUrl = `http://127.0.0.1:${process.env.PORT || '3000'}/config`;
51-
log.debug({ configUrl }, "Fetching OIDC configuration");
59+
log.debug({ url: req.nextUrl, configUrl }, "Fetching OIDC configuration");
5260

5361
let oidcEnabled = await fetch(configUrl, {
5462
cache: "force-cache",
@@ -61,9 +69,6 @@ export default async function middleware(req: NextRequest) {
6169
return false;
6270
});
6371

64-
const searchParams = req.nextUrl.searchParams;
65-
const requestPath = req.nextUrl.pathname;
66-
6772
// Explicitly check if the request is for `/api/schema` with required query parameters
6873
const isSchemaPublic =
6974
requestPath === "/api/schema" &&

0 commit comments

Comments
 (0)