Metamigo frontend build fixes
This commit is contained in:
parent
7aeb903a9e
commit
de17d54434
3 changed files with 15 additions and 13 deletions
|
|
@ -1,4 +1,5 @@
|
|||
/* eslint-disable unicorn/no-null */
|
||||
/* eslint-disable max-params */
|
||||
import type { Adapter } from "next-auth/adapters";
|
||||
// @ts-expect-error: Missing export
|
||||
import type { AppOptions } from "next-auth";
|
||||
|
|
@ -17,7 +18,7 @@ export interface Profile {
|
|||
createdBy: string;
|
||||
}
|
||||
|
||||
export type User = Profile & { id: string; createdAt: Date; updatedAt: Date };
|
||||
export type User = Profile & { id: string; createdAt: Date; updatedAt: Date; };
|
||||
|
||||
export interface Session {
|
||||
userId: string;
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@ export const sanitizeE164Number = (phoneNumber: string) => {
|
|||
if (!phoneNumber) return "";
|
||||
if (!phoneNumber.trim()) return "";
|
||||
const sanitized = phoneNumber
|
||||
.replace(/\s/g, "")
|
||||
.replace(/\./g, "")
|
||||
.replace(/-/g, "")
|
||||
.replace(/\(/g, "")
|
||||
.replace(/\)/g, "");
|
||||
.replaceAll(/\s/g, "")
|
||||
.replaceAll(".", "")
|
||||
.replaceAll("-", "")
|
||||
.replaceAll("(", "")
|
||||
.replaceAll(")", "");
|
||||
|
||||
if (sanitized[0] !== "+") return `+${sanitized}`;
|
||||
return sanitized;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue