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:
homarr-renovate[bot]
2024-10-16 21:43:51 +02:00
committed by GitHub
parent ea43ed0ca4
commit a87c937b69
39 changed files with 251 additions and 224 deletions

View File

@@ -8,7 +8,6 @@ import { useI18n, useScopedI18n } from "@homarr/translation/client";
import { z } from "@homarr/validation";
import type { Item } from "~/app/[locale]/boards/_types";
import { useItemActions } from "./item-actions";
interface InnerProps {
gridStack: GridStack;
@@ -21,7 +20,6 @@ export const ItemMoveModal = createModal<InnerProps>(({ actions, innerProps }) =
const t = useI18n();
// Keep track of the maximum width based on the x offset
const maxWidthRef = useRef(innerProps.columnCount - innerProps.item.xOffset);
const { moveAndResizeItem } = useItemActions();
const form = useZodForm(
z.object({
xOffset: z
@@ -62,7 +60,7 @@ export const ItemMoveModal = createModal<InnerProps>(({ actions, innerProps }) =
});
actions.closeModal();
},
[moveAndResizeItem],
[actions, innerProps.gridStack, innerProps.item.id],
);
return (

View File

@@ -39,7 +39,7 @@ export const GridStackItem = ({
if (type !== "section") return;
innerRef.current.gridstackNode.minW = minWidth;
innerRef.current.gridstackNode.minH = minHeight;
}, [minWidth, minHeight, innerRef]);
}, [minWidth, minHeight, innerRef, type]);
return (
<Box

View File

@@ -215,6 +215,7 @@ export const useGridstack = (section: Omit<Section, "items">, itemIds: string[])
}
// Only run this effect when the section items change
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [itemIds.length, columnCount]);
/**

View File

@@ -58,7 +58,7 @@ export const UserAvatarMenu = ({ children }: UserAvatarMenuProps) => {
router.refresh();
},
});
}, [openModal, router]);
}, [logoutUrl, openModal, router]);
return (
<Menu width={300} withArrow withinPortal>