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; return;
} }
setEmails(emails); setEmails([...new Set(emails)]);
} }
}, [filesContent]); }, [filesContent]);

View File

@@ -48,7 +48,7 @@ const CreatePanel = ({user, users, group, onCreate}: CreateDialogProps) => {
return; 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( const filteredUsers = emailUsers.filter(
(x) => (x) =>
((user.type === "developer" || user.type === "owner" || user.type === "admin") && ((user.type === "developer" || user.type === "owner" || user.type === "admin") &&

View File

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