From a06c8fcce98ede08217e3d3f8254cf3ec57639b8 Mon Sep 17 00:00:00 2001 From: ilya-bkv Date: Thu, 1 Dec 2022 21:58:01 +0300 Subject: [PATCH] Linter fixies --- src/context/profile.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/context/profile.tsx b/src/context/profile.tsx index 91bc4cb6..8d05861e 100644 --- a/src/context/profile.tsx +++ b/src/context/profile.tsx @@ -45,6 +45,7 @@ const useProfileForm = () => { const updateFormField = (fieldName: string, value: string, remove?: boolean) => { if (fieldName === 'links') { if (remove) { + //FIXME: TS Error: error Unnecessarily cloning an array unicorn/no-useless-spread setForm((prev) => ({ ...prev, links: [...prev.links.filter((item) => item !== value)] })) } else { setForm((prev) => ({ ...prev, links: [...prev.links, value] }))