add create a problem.

This commit is contained in:
2023-03-27 18:21:29 +08:00
parent 7f8260d34d
commit 9bc1a1b5b5
12 changed files with 831 additions and 11 deletions

View File

@@ -129,3 +129,12 @@ export function getUserRole(role: User["admin_type"]): {
}
return obj
}
export function unique<T>(arr: T[]) {
return arr.reduce((prev: T[], curr: T) => {
if (!prev.includes(curr)) {
prev.push(curr)
}
return prev
}, [])
}