From 679b619c41c719460e76175d7b9fb49d991019f1 Mon Sep 17 00:00:00 2001 From: Krzysztof Czerwinski Date: Wed, 18 Dec 2024 10:31:18 +0100 Subject: [PATCH] Fix reset password page --- autogpt_platform/frontend/src/app/reset_password/page.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/autogpt_platform/frontend/src/app/reset_password/page.tsx b/autogpt_platform/frontend/src/app/reset_password/page.tsx index 45a17cb49d16..b63f5a2ffd6c 100644 --- a/autogpt_platform/frontend/src/app/reset_password/page.tsx +++ b/autogpt_platform/frontend/src/app/reset_password/page.tsx @@ -1,5 +1,4 @@ "use client"; -import { useSupabase } from "@/components/providers/SupabaseProvider"; import { Button } from "@/components/ui/button"; import { Form, @@ -10,7 +9,7 @@ import { FormMessage, } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; -import useUser from "@/hooks/useUser"; +import useSupabase from "@/hooks/useSupabase"; import { zodResolver } from "@hookform/resolvers/zod"; import { useRouter } from "next/navigation"; import { useState } from "react"; @@ -33,8 +32,7 @@ const resetPasswordFormSchema = z }); export default function ResetPasswordPage() { - const { supabase, isLoading: isSupabaseLoading } = useSupabase(); - const { user, isLoading: isUserLoading } = useUser(); + const { supabase, user, isUserLoading } = useSupabase(); const router = useRouter(); const [isLoading, setIsLoading] = useState(false); const [feedback, setFeedback] = useState(null); @@ -54,7 +52,7 @@ export default function ResetPasswordPage() { }, }); - if (isUserLoading || isSupabaseLoading) { + if (isUserLoading) { return (