WIP ESLint fixes

This commit is contained in:
2025-03-28 11:35:51 +01:00
parent 4b9df95721
commit 9a905e83f7
40 changed files with 92 additions and 91 deletions

View File

@ -576,7 +576,7 @@ export function TokenRightsEditor(p: {
right={{ verb: "GET", path: `/api/nwfilter/${v.uuid}` }}
parent={{ verb: "GET", path: "/api/nwfilter/*" }}
/>
{ServerApi.Config.builtin_nwfilter_rules.includes(v.name!) ? (
{ServerApi.Config.builtin_nwfilter_rules.includes(v.name) ? (
<TableCell></TableCell>
) : (
<CellRight
@ -585,7 +585,7 @@ export function TokenRightsEditor(p: {
parent={{ verb: "PUT", path: "/api/nwfilter/*" }}
/>
)}
{ServerApi.Config.builtin_nwfilter_rules.includes(v.name!) ? (
{ServerApi.Config.builtin_nwfilter_rules.includes(v.name) ? (
<TableCell></TableCell>
) : (
<CellRight
@ -767,7 +767,7 @@ function RouteRight(p: RightOpts): React.ReactElement {
const parentActivated =
!!p.parent &&
p.token.rights.findIndex(
(r) => r.verb === p.parent?.verb && r.path === p.parent?.path
(r) => r.verb === p.parent?.verb && r.path === p.parent.path
) !== -1;
const toggle = (a: boolean) => {
@ -804,7 +804,7 @@ function RouteRight(p: RightOpts): React.ReactElement {
<Checkbox
checked={activated || parentActivated}
disabled={!p.editable || parentActivated}
onChange={(_e, a) => toggle(a)}
onChange={(_e, a) => { toggle(a); }}
/>
}
label={p.label}
@ -814,7 +814,7 @@ function RouteRight(p: RightOpts): React.ReactElement {
<Checkbox
checked={activated || parentActivated}
disabled={!p.editable || parentActivated}
onChange={(_e, a) => toggle(a)}
onChange={(_e, a) => { toggle(a); }}
/>
</span>
)}