Solved an oopsie

This commit is contained in:
Tiago Ribeiro
2023-10-09 22:38:09 +01:00
parent cb3790dc1d
commit 0c9a49a9c3
3 changed files with 20 additions and 7 deletions

View File

@@ -28,7 +28,7 @@ export default function BatchCodeGenerator() {
return;
}
setEmails(emails);
setEmails([...new Set(emails)]);
}
}, [filesContent]);

View File

@@ -48,7 +48,7 @@ const CreatePanel = ({user, users, group, onCreate}: CreateDialogProps) => {
return;
}
const emailUsers = emails.map((x) => users.find((y) => y.email.toLowerCase() === x)).filter((x) => x !== undefined);
const emailUsers = [...new Set(emails)].map((x) => users.find((y) => y.email.toLowerCase() === x)).filter((x) => x !== undefined);
const filteredUsers = emailUsers.filter(
(x) =>
((user.type === "developer" || user.type === "owner" || user.type === "admin") &&

View File

@@ -1,7 +1,11 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
@@ -15,10 +19,19 @@
"jsx": "preserve",
"incremental": true,
"baseUrl": ".",
"downlevelIteration": true,
"paths": {
"@/*": ["./src/*"]
"@/*": [
"./src/*"
]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx"
],
"exclude": [
"node_modules"
]
}