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
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import React, { useState } from "react";
|
||||
import React, { useCallback, useState } from "react";
|
||||
import { Center, Stack, Text, UnstyledButton } from "@mantine/core";
|
||||
|
||||
import { clientApi } from "@homarr/api/client";
|
||||
@@ -38,7 +38,7 @@ export default function SmartHomeEntityStateWidget({
|
||||
|
||||
const attribute = options.entityUnit.length > 0 ? " " + options.entityUnit : "";
|
||||
|
||||
const handleClick = React.useCallback(() => {
|
||||
const handleClick = useCallback(() => {
|
||||
if (isEditMode) {
|
||||
return;
|
||||
}
|
||||
@@ -51,7 +51,7 @@ export default function SmartHomeEntityStateWidget({
|
||||
entityId: options.entityId,
|
||||
integrationId: integrationIds[0] ?? "",
|
||||
});
|
||||
}, []);
|
||||
}, [integrationIds, isEditMode, mutate, options.clickable, options.entityId]);
|
||||
|
||||
return (
|
||||
<UnstyledButton
|
||||
|
||||
@@ -31,7 +31,7 @@ export default function SmartHomeTriggerAutomationWidget({
|
||||
automationId: options.automationId,
|
||||
integrationId: integrationIds[0] ?? "",
|
||||
});
|
||||
}, [isEditMode]);
|
||||
}, [integrationIds, isEditMode, mutateAsync, options.automationId]);
|
||||
return (
|
||||
<UnstyledButton onClick={handleClick} style={{ cursor: !isEditMode ? "pointer" : "initial" }} w="100%" h="100%">
|
||||
{isShowSuccess && (
|
||||
|
||||
Reference in New Issue
Block a user