import React, { useState } from "react"; import { supabase } from "../supabaseClient"; export default function ResetPassword() { const [password, setPassword] = useState(""); const [loading, setLoading] = useState(false); const handleUpdate = async (e) => { e.preventDefault(); setLoading(true); const { error } = await supabase.auth.updateUser({ password: password }); if (error) { alert(error.message); } else { alert("Password updated successfully!"); window.location.href = "/"; } setLoading(false); }; return (