Add missing useCallback wrapping inside ImportServerBtn

This commit is contained in:
Alejandro Celaya 2023-09-02 20:44:03 +02:00
parent a23d441dd3
commit 65d3a19530

View file

@ -67,10 +67,10 @@ export const ImportServersBtn = (serversImporter: ServersImporter): FC<ImportSer
create(serversToCreate.current);
hideModal();
}, [create, hideModal, serversToCreate]);
const createNonDuplicatedServers = () => {
const createNonDuplicatedServers = useCallback(() => {
create(serversToCreate.current.filter(complement(serversFiltering(duplicatedServers))));
hideModal();
};
}, [create, duplicatedServers, hideModal]);
return (
<>