Linter fixies
This commit is contained in:
parent
38fe38c7fb
commit
a06c8fcce9
|
@ -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] }))
|
||||
|
|
Loading…
Reference in New Issue
Block a user