feat: make admin adding and removal consistent with mods
This commit is contained in:
1 parent
9d0694f138
commit
98eeadab42
4 files changed
+92
-14
No files matched your search
@@ -94,3 +94,7 @@ export const trycatch = <T>(func: () => T): Maybe<T> => {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export const removeItem = <T>(array: T[], predicate: (item: T) => boolean) => {
|
||||
array.splice(array.findIndex(predicate), 1)
|
||||
}
|
||||
Reference in new issue
Block a user