fix(deps): update dependency eslint-plugin-react-hooks to v5 (#1280)
* fix(deps): update dependency eslint-plugin-react-hooks to v5 * fix: lint issues after reenabling hook rules * fix: format issues --------- Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com> Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
committed by
GitHub
parent
ea43ed0ca4
commit
a87c937b69
@@ -53,7 +53,7 @@ export const ConfirmModal = createModal<Omit<ConfirmModalProps, "title">>(({ act
|
||||
actions.closeModal();
|
||||
}
|
||||
},
|
||||
[cancelProps?.onClick, onCancel, actions.closeModal],
|
||||
[cancelProps, onCancel, closeOnCancel, actions],
|
||||
);
|
||||
|
||||
const handleConfirm = useCallback(
|
||||
@@ -73,7 +73,7 @@ export const ConfirmModal = createModal<Omit<ConfirmModalProps, "title">>(({ act
|
||||
}
|
||||
setLoading(false);
|
||||
},
|
||||
[confirmProps?.onClick, onConfirm, actions.closeModal],
|
||||
[confirmProps, onConfirm, closeOnConfirm, actions],
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
@@ -38,7 +38,7 @@ export const ModalProvider = ({ children }: PropsWithChildren) => {
|
||||
(id: string, canceled?: boolean) => {
|
||||
dispatch({ type: "CLOSE", modalId: id, canceled });
|
||||
},
|
||||
[stateRef, dispatch],
|
||||
[dispatch],
|
||||
);
|
||||
|
||||
const openModalInner: ModalContextProps["openModalInner"] = useCallback(
|
||||
@@ -63,10 +63,7 @@ export const ModalProvider = ({ children }: PropsWithChildren) => {
|
||||
[dispatch],
|
||||
);
|
||||
|
||||
const handleCloseModal = useCallback(
|
||||
() => state.current && closeModal(state.current.id),
|
||||
[closeModal, state.current?.id],
|
||||
);
|
||||
const handleCloseModal = useCallback(() => state.current && closeModal(state.current.id), [closeModal, state]);
|
||||
|
||||
const activeModals = state.modals.filter((modal) => modal.id === state.current?.id || modal.props.keepMounted);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user