From 65d3a195303e52183968b24681cb5de482bdfafa Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 2 Sep 2023 20:44:03 +0200 Subject: [PATCH] Add missing useCallback wrapping inside ImportServerBtn --- src/servers/helpers/ImportServersBtn.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/servers/helpers/ImportServersBtn.tsx b/src/servers/helpers/ImportServersBtn.tsx index a2c54e4c..9856bd9e 100644 --- a/src/servers/helpers/ImportServersBtn.tsx +++ b/src/servers/helpers/ImportServersBtn.tsx @@ -67,10 +67,10 @@ export const ImportServersBtn = (serversImporter: ServersImporter): FC { + const createNonDuplicatedServers = useCallback(() => { create(serversToCreate.current.filter(complement(serversFiltering(duplicatedServers)))); hideModal(); - }; + }, [create, duplicatedServers, hideModal]); return ( <>