diff --git a/packages/features/auth/lib/next-auth-custom-adapter.ts b/packages/features/auth/lib/next-auth-custom-adapter.ts index 4d5ff9f32a..80f4efabce 100644 --- a/packages/features/auth/lib/next-auth-custom-adapter.ts +++ b/packages/features/auth/lib/next-auth-custom-adapter.ts @@ -14,7 +14,8 @@ import { identityProviderNameMap } from "./identityProviderNameMap"; export default function CalComAdapter(prismaClient: PrismaClient) { return { createUser: (data: Prisma.UserCreateInput) => prismaClient.user.create({ data }), - getUser: (id: User["id"]) => prismaClient.user.findUnique({ where: { id } }), + getUser: (id: string | number) => + prismaClient.user.findUnique({ where: { id: typeof id === "string" ? parseInt(id) : id } }), getUserByEmail: (email: User["email"]) => prismaClient.user.findUnique({ where: { email } }), async getUserByAccount(provider_providerAccountId: { providerAccountId: Account["providerAccountId"]; diff --git a/packages/features/auth/lib/sendVerificationRequest.ts b/packages/features/auth/lib/sendVerificationRequest.ts index a32a0fb544..6927185305 100644 --- a/packages/features/auth/lib/sendVerificationRequest.ts +++ b/packages/features/auth/lib/sendVerificationRequest.ts @@ -15,7 +15,7 @@ const transporter = nodemailer.createTransport({ const sendVerificationRequest = async ({ identifier, url }: SendVerificationRequestParams) => { const emailsDir = path.resolve(process.cwd(), "..", "..", "packages/emails", "templates"); const originalUrl = new URL(url); - const webappUrl = new URL(WEBAPP_URL); + const webappUrl = new URL(process.env.NEXTAUTH_URL || WEBAPP_URL); if (originalUrl.origin !== webappUrl.origin) { url = url.replace(originalUrl.origin, webappUrl.origin); } diff --git a/packages/ui/components/toast/showToast.tsx b/packages/ui/components/toast/showToast.tsx index df082db640..16b43a9f5b 100644 --- a/packages/ui/components/toast/showToast.tsx +++ b/packages/ui/components/toast/showToast.tsx @@ -69,16 +69,12 @@ export function showToast( ) { switch (variant) { case "success": - toast.custom((t) => , { duration }); - break; + return toast.custom((t) => , { duration }); case "error": - toast.custom((t) => , { duration }); - break; + return toast.custom((t) => , { duration }); case "warning": - toast.custom((t) => , { duration }); - break; + return toast.custom((t) => , { duration }); default: - toast.custom((t) => , { duration }); - break; + return toast.custom((t) => , { duration }); } } diff --git a/packages/ui/package.json b/packages/ui/package.json index eedf0bb42f..c25cbaa366 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -6,6 +6,7 @@ "main": "./index.tsx", "exports": { ".": "./index.tsx", + "./components/toast": "./components/toast/index.tsx", "./components/icon": "./components/icon/index.ts" }, "types": "./index.tsx", diff --git a/yarn.lock b/yarn.lock index 1acd30a121..3cdf3062e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3844,8 +3844,10 @@ __metadata: eslint-config-next: ^13.2.1 next: ^13.4.6 next-auth: ^4.20.1 + postcss: ^8.4.18 react: ^18.2.0 react-dom: ^18.2.0 + tailwindcss: ^3.3.1 typescript: ^4.9.4 languageName: unknown linkType: soft