Switch to version 1: remove src/app/password-reset/page.tsx
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
"use client";
|
||||
|
||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||
import { useState } from "react";
|
||||
import Input from '@/components/form/Input';
|
||||
import ButtonExpandHover from '@/components/button/ButtonExpandHover';
|
||||
|
||||
export default function PasswordResetPage() {
|
||||
const [email, setEmail] = useState("");
|
||||
|
||||
const handleReset = async () => {
|
||||
await fetch("/api/auth/password-reset/", {
|
||||
method: "POST", headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ email }),
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<ThemeProvider>
|
||||
<main className="flex min-h-screen flex-col items-center justify-center p-8">
|
||||
<div className="w-full max-w-md space-y-6">
|
||||
<h1 className="text-3xl font-bold">Reset Password</h1>
|
||||
<Input value={email} onChange={setEmail} placeholder="Email" />
|
||||
<ButtonExpandHover text="Send Reset Link" onClick={handleReset} />
|
||||
</div>
|
||||
</main>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user