Skip to content

Commit 07c9308

Browse files
committed
Fix lint errors after merging main into beta
1 parent 3febf11 commit 07c9308

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

src/components/RecipeEditor/EditStepDialog.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ export const EditStepDialog = ({ onClose, step, round }: EditStepDialogProps) =>
266266
if (isInEditMode) {
267267
return [
268268
<GridActionsCellItem
269+
key={`save-${id}`}
269270
icon={<Save />}
270271
label="Save"
271272
sx={{
@@ -274,6 +275,7 @@ export const EditStepDialog = ({ onClose, step, round }: EditStepDialogProps) =>
274275
onClick={handleSaveClick(id)}
275276
/>,
276277
<GridActionsCellItem
278+
key={`cancel-${id}`}
277279
icon={<Cancel />}
278280
label="Cancel"
279281
className="textPrimary"
@@ -285,13 +287,15 @@ export const EditStepDialog = ({ onClose, step, round }: EditStepDialogProps) =>
285287

286288
return [
287289
<GridActionsCellItem
290+
key={`edit-${id}`}
288291
icon={<Edit />}
289292
label="Edit"
290293
className="textPrimary"
291294
onClick={handleEditClick(id)}
292295
color="inherit"
293296
/>,
294297
<GridActionsCellItem
298+
key={`delete-${id}`}
295299
icon={<Delete />}
296300
label="Delete"
297301
onClick={handleDeleteClick(id)}
@@ -343,7 +347,7 @@ export const EditStepDialog = ({ onClose, step, round }: EditStepDialogProps) =>
343347
<FormHelperText>{generatorDef?.description ?? ''}</FormHelperText>
344348
</FormControl>
345349
{Object.keys(generatorDef?.optionsDef ?? {}).map((optionKey) => (
346-
<FormControl variant="outlined" sx={{ m: 1, flex: 1 }}>
350+
<FormControl key={optionKey} variant="outlined" sx={{ m: 1, flex: 1 }}>
347351
<InputLabel id={`generator-${optionKey}-label`}>{optionKey}</InputLabel>
348352
{generatorDef.optionsDef[optionKey].type === 'select' && (
349353
<Select
@@ -358,7 +362,9 @@ export const EditStepDialog = ({ onClose, step, round }: EditStepDialogProps) =>
358362
}))
359363
}>
360364
{generatorDef.optionsDef[optionKey].values.map((option) => (
361-
<MenuItem value={option}>{option}</MenuItem>
365+
<MenuItem key={option} value={option}>
366+
{option}
367+
</MenuItem>
362368
))}
363369
</Select>
364370
)}

src/lib/recipes/clusters.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,10 @@ export const getBaseCluster = (
9494
roundId: string
9595
) => {
9696
switch (base) {
97-
case 'personsInRound':
97+
case 'personsInRound': {
9898
const round = wcif.events.flatMap((e) => e.rounds).find((r) => r.id === roundId) as Round;
9999
return personsShouldBeInRound(round)(acceptedRegistrations(wcif.persons));
100+
}
100101
default:
101102
return wcif.persons;
102103
}
@@ -136,7 +137,7 @@ export const getCluster = (wcif: Competition, cluster: ClusterDefinition, roundI
136137
throw new Error(`Filter ${key} not found`);
137138
}
138139

139-
// @ts-ignore
140+
// @ts-expect-error filter typing depends on filter key/value pair
140141
return acc.filter(filter(value, activityIds));
141142
}, baseCluster);
142143

0 commit comments

Comments
 (0)