Skip to content

Commit

Permalink
Fix reset password page
Browse files Browse the repository at this point in the history
  • Loading branch information
kcze committed Dec 18, 2024
1 parent 56b69d8 commit 679b619
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions autogpt_platform/frontend/src/app/reset_password/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"use client";
import { useSupabase } from "@/components/providers/SupabaseProvider";
import { Button } from "@/components/ui/button";
import {
Form,
Expand All @@ -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";
Expand All @@ -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<string | null>(null);
Expand All @@ -54,7 +52,7 @@ export default function ResetPasswordPage() {
},
});

if (isUserLoading || isSupabaseLoading) {
if (isUserLoading) {
return (
<div className="flex h-[80vh] items-center justify-center">
<FaSpinner className="mr-2 h-16 w-16 animate-spin" />
Expand Down

0 comments on commit 679b619

Please sign in to comment.