diff --git a/src/frontend/components/DeleteAllEntriesListItem.tsx b/src/frontend/components/DeleteAllEntriesListItem.tsx index 986ea30..5f9582d 100644 --- a/src/frontend/components/DeleteAllEntriesListItem.tsx +++ b/src/frontend/components/DeleteAllEntriesListItem.tsx @@ -12,13 +12,12 @@ export type DeleteAllEntriesListItemProps = { onClick: () => Promise; }; -export const DeleteAllEntriesListItem: FunctionComponent = ({ - onClick, -}) => { +export const DeleteAllEntriesListItem: FunctionComponent< + DeleteAllEntriesListItemProps +> = ({ onClick }) => { const [disabled, setDisabled] = useState(false); - const [confirmationDialogOpen, setConfirmationDialogOpen] = useState( - false - ); + const [confirmationDialogOpen, setConfirmationDialogOpen] = + useState(false); const handleClick = () => setConfirmationDialogOpen(true); diff --git a/src/frontend/components/EntryListItem.tsx b/src/frontend/components/EntryListItem.tsx index bae20ce..e9a9eca 100644 --- a/src/frontend/components/EntryListItem.tsx +++ b/src/frontend/components/EntryListItem.tsx @@ -34,22 +34,20 @@ export const EntryListItem: FunctionComponent = ({ toggle: false, }); - const handleButtonClick = ( - callback: () => Promise, - key: keyof EntryListItemButtons - ) => () => { - setDisabledButtons((oldState) => ({ - ...oldState, - [key]: true, - })); - - callback().finally(() => + const handleButtonClick = + (callback: () => Promise, key: keyof EntryListItemButtons) => () => { setDisabledButtons((oldState) => ({ ...oldState, - [key]: false, - })) - ); - }; + [key]: true, + })); + + callback().finally(() => + setDisabledButtons((oldState) => ({ + ...oldState, + [key]: false, + })) + ); + }; return ( diff --git a/src/frontend/components/dialog/DeleteAllConfirmationDialog.tsx b/src/frontend/components/dialog/DeleteAllConfirmationDialog.tsx index b84b0ff..51aba57 100644 --- a/src/frontend/components/dialog/DeleteAllConfirmationDialog.tsx +++ b/src/frontend/components/dialog/DeleteAllConfirmationDialog.tsx @@ -10,10 +10,9 @@ export type DeleteAllConfirmationDialogProps = { open: boolean; }; -export const DeleteAllConfirmationDialog: FunctionComponent = ({ - onAnswer, - open, -}) => { +export const DeleteAllConfirmationDialog: FunctionComponent< + DeleteAllConfirmationDialogProps +> = ({ onAnswer, open }) => { const handleOnAnswer = (answer: boolean) => () => onAnswer(answer); return (