Fix ESLint issues
This commit is contained in:
		@@ -36,7 +36,7 @@ export function SelectAccountDialog(p: {
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  return (
 | 
			
		||||
    <Dialog open={p.open} onClose={() => p.onClose()}>
 | 
			
		||||
    <Dialog open={p.open} onClose={() => { p.onClose(); }}>
 | 
			
		||||
      <DialogTitle>{p.title}</DialogTitle>
 | 
			
		||||
      <DialogContent dividers>
 | 
			
		||||
        <DialogContentText>{p.description}</DialogContentText>
 | 
			
		||||
@@ -53,7 +53,7 @@ export function SelectAccountDialog(p: {
 | 
			
		||||
                    undefined
 | 
			
		||||
                  }
 | 
			
		||||
                  checked={option.id === choice?.id}
 | 
			
		||||
                  onChange={() => setChoice(option)}
 | 
			
		||||
                  onChange={() => { setChoice(option); }}
 | 
			
		||||
                />
 | 
			
		||||
              }
 | 
			
		||||
              label={
 | 
			
		||||
@@ -72,7 +72,7 @@ export function SelectAccountDialog(p: {
 | 
			
		||||
        </RadioGroup>
 | 
			
		||||
      </DialogContent>
 | 
			
		||||
      <DialogActions>
 | 
			
		||||
        <Button onClick={() => p.onClose()}>Cancel</Button>
 | 
			
		||||
        <Button onClick={() => { p.onClose(); }}>Cancel</Button>
 | 
			
		||||
        <Button onClick={submit} autoFocus disabled={choice === null}>
 | 
			
		||||
          {p.confirmButton ?? "Submit"}
 | 
			
		||||
        </Button>
 | 
			
		||||
 
 | 
			
		||||
@@ -54,9 +54,9 @@ export function ChooseAccountDialogProvider(
 | 
			
		||||
 | 
			
		||||
  return (
 | 
			
		||||
    <>
 | 
			
		||||
      <DialogContextK.Provider value={hook}>
 | 
			
		||||
      <DialogContextK value={hook}>
 | 
			
		||||
        {p.children}
 | 
			
		||||
      </DialogContextK.Provider>
 | 
			
		||||
      </DialogContextK>
 | 
			
		||||
 | 
			
		||||
      {open && (
 | 
			
		||||
        <SelectAccountDialog
 | 
			
		||||
@@ -74,5 +74,5 @@ export function ChooseAccountDialogProvider(
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function useSelectAccount(): DialogContext {
 | 
			
		||||
  return React.useContext(DialogContextK)!;
 | 
			
		||||
  return React.use(DialogContextK)!;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -77,7 +77,7 @@ export function AccountRoute(): React.ReactElement {
 | 
			
		||||
          <AsyncWidget
 | 
			
		||||
            loadKey={`${account.id}-${loadKey.current}`}
 | 
			
		||||
            load={load}
 | 
			
		||||
            ready={movements !== null}
 | 
			
		||||
            ready={movements}
 | 
			
		||||
            errMsg="Failed to load the list of movements!"
 | 
			
		||||
            build={() => (
 | 
			
		||||
              <MovementsTable needReload={reload} movements={movements!} />
 | 
			
		||||
@@ -166,7 +166,7 @@ function MovementsTable(p: {
 | 
			
		||||
          movements:
 | 
			
		||||
          <ul>
 | 
			
		||||
            {movements.map((m) => (
 | 
			
		||||
              <li>
 | 
			
		||||
              <li key={m.id}>
 | 
			
		||||
                {m.label} ({m.amount} €)
 | 
			
		||||
              </li>
 | 
			
		||||
            ))}
 | 
			
		||||
@@ -209,7 +209,7 @@ function MovementsTable(p: {
 | 
			
		||||
            Do you really want to delete the following movements:
 | 
			
		||||
            <ul>
 | 
			
		||||
              {movements.map((m) => (
 | 
			
		||||
                <li>
 | 
			
		||||
                <li key={m.id}>
 | 
			
		||||
                  {m.label} ({m.amount} €)
 | 
			
		||||
                </li>
 | 
			
		||||
              ))}
 | 
			
		||||
@@ -294,7 +294,7 @@ function MovementsTable(p: {
 | 
			
		||||
      editable: false,
 | 
			
		||||
      getActions: (params) => {
 | 
			
		||||
        return [
 | 
			
		||||
          <Tooltip title="Move to another account">
 | 
			
		||||
          <Tooltip title="Move to another account" key="move">
 | 
			
		||||
            <GridActionsCellItem
 | 
			
		||||
              icon={<DriveFileMoveOutlineIcon />}
 | 
			
		||||
              label="Move to another account"
 | 
			
		||||
@@ -302,7 +302,7 @@ function MovementsTable(p: {
 | 
			
		||||
              color="inherit"
 | 
			
		||||
            />
 | 
			
		||||
          </Tooltip>,
 | 
			
		||||
          <Tooltip title="Delete the movement">
 | 
			
		||||
          <Tooltip title="Delete the movement" key="delete">
 | 
			
		||||
            <GridActionsCellItem
 | 
			
		||||
              icon={<DeleteIcon color="error" />}
 | 
			
		||||
              label="Delete"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user