diff --git a/web/app/accounts/forgot-password/page.tsx b/web/app/accounts/forgot-password/page.tsx index 22a241db6..1082a1ab3 100644 --- a/web/app/accounts/forgot-password/page.tsx +++ b/web/app/accounts/forgot-password/page.tsx @@ -6,6 +6,7 @@ import Link from "next/link"; import { useSearchParams } from "next/navigation"; import { useTheme } from "next-themes"; import { Controller, useForm } from "react-hook-form"; +import useSWR from "swr"; // icons import { CircleCheck } from "lucide-react"; // plane imports @@ -17,7 +18,7 @@ import { EPageTypes } from "@/helpers/authentication.helper"; import { cn } from "@/helpers/common.helper"; import { checkEmailValidity } from "@/helpers/string.helper"; // hooks -import { useEventTracker } from "@/hooks/store"; +import { useEventTracker, useInstance } from "@/hooks/store"; import useTimer from "@/hooks/use-timer"; // wrappers import { AuthenticationWrapper } from "@/lib/wrappers"; @@ -48,6 +49,7 @@ const ForgotPasswordPage = observer(() => { const { t } = useTranslation(); // store hooks const { captureEvent } = useEventTracker(); + const { fetchInstanceConfigurations, formattedConfig } = useInstance(); // hooks const { resolvedTheme } = useTheme(); // timer @@ -93,6 +95,11 @@ const ForgotPasswordPage = observer(() => { }); }; + useSWR("INSTANCE_CONFIGURATIONS", () => fetchInstanceConfigurations()); + + // derived values + const enableSignUpConfig = formattedConfig?.ENABLE_SIGNUP ?? ""; + const logo = resolvedTheme === "light" ? BlackHorizontalLogo : WhiteHorizontalLogo; return ( @@ -101,39 +108,41 @@ const ForgotPasswordPage = observer(() => {
{t("auth.forgot_password.description")}