From 9bb723a33b78e481fdeee8d525f41c7406abb643 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Wed, 26 Mar 2025 19:51:33 +0800 Subject: [PATCH] feat: remove email verification toast --- apps/desktop/locales/errors/en.json | 1 + .../app-layout/feed-column/index.shared.tsx | 62 +------------------ 2 files changed, 2 insertions(+), 61 deletions(-) diff --git a/apps/desktop/locales/errors/en.json b/apps/desktop/locales/errors/en.json index 68a69aafc..063da405c 100644 --- a/apps/desktop/locales/errors/en.json +++ b/apps/desktop/locales/errors/en.json @@ -8,6 +8,7 @@ "1004": "No permission", "1005": "Internal error", "1006": "Email not verified", + "1007": "Captcha verification failed", "1100": "Trial user max feed subscription exceeded", "1101": "Trial user max list subscription exceeded", "1102": "Trial user max inbox subscription exceeded", diff --git a/apps/desktop/src/renderer/src/modules/app-layout/feed-column/index.shared.tsx b/apps/desktop/src/renderer/src/modules/app-layout/feed-column/index.shared.tsx index ada9cf4e9..c50b3b39f 100644 --- a/apps/desktop/src/renderer/src/modules/app-layout/feed-column/index.shared.tsx +++ b/apps/desktop/src/renderer/src/modules/app-layout/feed-column/index.shared.tsx @@ -1,12 +1,7 @@ -import { cn } from "@follow/utils/utils" -import { lazy, Suspense, useEffect, useState } from "react" -import { useTranslation } from "react-i18next" -import { toast } from "sonner" +import { lazy, Suspense } from "react" import { useWhoami } from "~/atoms/user" -import { WEB_URL } from "~/constants/env" import { useAuthQuery } from "~/hooks/common/useBizQuery" -import { sendVerificationEmail } from "~/lib/auth" import { settings } from "~/queries/settings" const LazyNewUserGuideModal = lazy(() => @@ -19,64 +14,9 @@ export function NewUserGuide() { const isNewUser = !isLoading && remoteSettings && Object.keys(remoteSettings.updated ?? {}).length === 0 - useEffect(() => { - if (user?.email && !user.emailVerified) { - toast.error(, { - id: "email-verification", - duration: Infinity, - closeButton: true, - }) - } - }, [user?.emailVerified]) - return user && isNewUser ? ( ) : null } - -function EmailVerificationToast({ - user, -}: { - user: { - email: string - } -}) { - const { t } = useTranslation("settings") - const [isEmailVerificationSent, setIsEmailVerificationSent] = useState(false) - return ( -
-
- {t("profile.email.verify_email", { - email_address: user.email, - })} -
- -
- ) -}