⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.
TypeScript bookmarkbookmark-managercollaborationnextjsreact-nativeread-it-laterself-hostedtypescript
small improvements
daniel31x13142af9b5c0d7
diff --git a/components/ModalContent/EmailChangeVerificationModal.tsx b/components/ModalContent/EmailChangeVerificationModal.tsxindex 15560d94..20fe0ef2 100644--- a/components/ModalContent/EmailChangeVerificationModal.tsx+++ b/components/ModalContent/EmailChangeVerificationModal.tsx@@ -26,11 +26,17 @@ export default function EmailChangeVerificationModal({<div className="flex flex-col gap-5"><p>Please confirm your password before changing your email address.{" "}- {process.env.NEXT_PUBLIC_STRIPE === "true"- ? "Updating this field will change your billing email on Stripe as well."- : undefined}+ {process.env.NEXT_PUBLIC_STRIPE === "true" &&+ "Updating this field will change your billing email on Stripe as well."}</p>+ {process.env.NEXT_PUBLIC_GOOGLE_ENABLED === "true" && (+ <p>+ If you change your email address, any existing Google SSO+ connections will be removed.+ </p>+ )}+<div><p>Old Email</p><p className="text-neutral">{oldEmail}</p>diff --git a/lib/api/controllers/users/userId/updateUserById.ts b/lib/api/controllers/users/userId/updateUserById.tsindex cbf8a152..c5016316 100644--- a/lib/api/controllers/users/userId/updateUserById.ts+++ b/lib/api/controllers/users/userId/updateUserById.ts@@ -148,7 +148,11 @@ export default async function updateUserById(};}- sendChangeEmailVerificationRequest(user.email, data.email, data.name);+ sendChangeEmailVerificationRequest(+ user.email,+ data.email,+ data.name.trim()+ );}// Other settings / Apply changes@@ -161,7 +165,7 @@ export default async function updateUserById(id: userId,},data: {- name: data.name,+ name: data.name.trim(),username: data.username?.toLowerCase().trim(),isPrivate: data.isPrivate,image:diff --git a/pages/auth/verify-email.tsx b/pages/auth/verify-email.tsxindex ce4d9670..db3e9206 100644--- a/pages/auth/verify-email.tsx+++ b/pages/auth/verify-email.tsx@@ -1,3 +1,4 @@+import { signOut } from "next-auth/react";import { useRouter } from "next/router";import { useEffect } from "react";import toast from "react-hot-toast";@@ -18,7 +19,10 @@ const VerifyEmail = () => {method: "POST",}).then((res) => {if (res.ok) {- toast.success("Email verified. You can now login.");+ toast.success("Email verified. Signing out..");+ setTimeout(() => {+ signOut();+ }, 3000);} else {toast.error("Invalid token.");}@@ -27,7 +31,7 @@ const VerifyEmail = () => {console.log(token);}, []);- return <div>Verify email...</div>;+ return <></>;};export default VerifyEmail;