From 33ce8cc5bf17d3ea832716afaa4855cfc8ead519 Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Tue, 4 Feb 2025 17:53:36 +0100 Subject: [PATCH] fix(frontend): remove unnecessary useMemo --- frontend/src/hooks/useDialogs.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/frontend/src/hooks/useDialogs.ts b/frontend/src/hooks/useDialogs.ts index ec3ee7bd..4b6ef29c 100644 --- a/frontend/src/hooks/useDialogs.ts +++ b/frontend/src/hooks/useDialogs.ts @@ -6,7 +6,7 @@ * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ -import React, { useContext, useMemo } from "react"; +import React, { useContext } from "react"; import { ConfirmDialog } from "@/app-components/dialogs"; import { DialogsContext } from "@/contexts/dialogs.context"; @@ -50,12 +50,9 @@ export const useDialogs = (): DialogHook => { [open], ); - return useMemo( - () => ({ - open, - close, - confirm, - }), - [close, open, confirm], - ); + return { + open, + close, + confirm, + }; };