Formatted the code to accept .xlsx

This commit is contained in:
Tiago Ribeiro
2024-01-12 13:49:27 +00:00
parent 6cdee9b268
commit ad1dbaef27
2 changed files with 3 additions and 3 deletions

View File

@@ -49,7 +49,7 @@ export default function BatchCodeGenerator({user}: {user: User}) {
const information = uniqBy(
rows
.map((row) => {
const [firstName, lastName, country, passport_id, email, phone] = row.map((x) => (x as string).trim());
const [firstName, lastName, country, passport_id, email, phone] = row as string[];
return EMAIL_REGEX.test(email) && !users.map((u) => u.email).includes(email)
? {
email,