Fix ESLint issues

This commit is contained in:
2025-05-14 22:04:34 +02:00
parent 91e5d8af31
commit 5aa954dca2
10 changed files with 46 additions and 39 deletions

View File

@@ -133,19 +133,19 @@ export function SelectMovementWidget(p: {
<div style={{ flex: 1 }}>
<AsyncWidget
loadKey={
loadKey.current + "/" + accountId + "/" + JSON.stringify(filters)
}
loadKey={`${loadKey.current}/${accountId}/${JSON.stringify(
filters
)}`}
load={load}
errMsg="Failed to load the list of movements!"
build={() => {
if (list === null)
if (list === undefined)
return (
<Typography style={{ textAlign: "center", padding: "20px" }}>
Select an account to begin research.
</Typography>
);
if (list?.length === 0)
if (list.length === 0)
return (
<Typography style={{ textAlign: "center", padding: "20px" }}>
No result.
@@ -154,11 +154,13 @@ export function SelectMovementWidget(p: {
return (
<>
{list?.map((entry) => (
<ListItem>
{list.map((entry) => (
<ListItem key={entry.id}>
<ListItemButton
selected={entry.id === p.value}
onClick={() => p.onChange(entry)}
onClick={() => {
p.onChange(entry);
}}
>
<MovementWidget movement={entry} />
</ListItemButton>