diff --git a/apps/web/app/(landing)/login/error/page.tsx b/apps/web/app/(landing)/login/error/page.tsx index 957624c3cc..efeaffc21e 100644 --- a/apps/web/app/(landing)/login/error/page.tsx +++ b/apps/web/app/(landing)/login/error/page.tsx @@ -2,7 +2,7 @@ import { useRouter } from "next/navigation"; import Link from "next/link"; -import { useEffect } from "react"; +import { Suspense, useEffect } from "react"; import { Button } from "@/components/ui/button"; import { BasicLayout } from "@/components/layouts/BasicLayout"; import { ErrorPage } from "@/components/ErrorPage"; @@ -11,6 +11,7 @@ import { useUser } from "@/hooks/useUser"; import { LoadingContent } from "@/components/LoadingContent"; import { Loading } from "@/components/Loading"; import { WELCOME_PATH } from "@/utils/config"; +import { CrispChatLoggedOutVisible } from "@/components/CrispChat"; export default function LogInErrorPage() { const { data, isLoading, error } = useUser(); @@ -33,7 +34,7 @@ export default function LogInErrorPage() { Log In @@ -42,6 +43,10 @@ export default function LogInErrorPage() { /> {/* */} + + + + ); } diff --git a/apps/web/app/(landing)/login/page.tsx b/apps/web/app/(landing)/login/page.tsx index eab0633f90..f06f13d62c 100644 --- a/apps/web/app/(landing)/login/page.tsx +++ b/apps/web/app/(landing)/login/page.tsx @@ -8,6 +8,7 @@ import { AlertBasic } from "@/components/Alert"; import { env } from "@/env"; import { Button } from "@/components/ui/button"; import { WELCOME_PATH } from "@/utils/config"; +import { CrispChatLoggedOutVisible } from "@/components/CrispChat"; export const metadata: Metadata = { title: "Log in | Inbox Zero", @@ -100,10 +101,15 @@ function ErrorAlert({ error }: { error: string }) { } return ( - + <> + + + + + ); } diff --git a/apps/web/components/CrispChat.tsx b/apps/web/components/CrispChat.tsx index 7a6d2217b3..519ba685cc 100644 --- a/apps/web/components/CrispChat.tsx +++ b/apps/web/components/CrispChat.tsx @@ -41,4 +41,14 @@ const CrispChat = () => { return null; }; +// This is used to show the Crisp chat when the user is logged out, and auto opens to help the user +export const CrispChatLoggedOutVisible = () => { + useEffect(() => { + if (!env.NEXT_PUBLIC_CRISP_WEBSITE_ID) return; + Crisp.configure(env.NEXT_PUBLIC_CRISP_WEBSITE_ID); + }, []); + + return null; +}; + export default CrispChat; diff --git a/version.txt b/version.txt index 5f0936f3a1..641829179b 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v2.8.12 +v2.8.13