Task 10.3: Add "Forgot password?" link with toast and "Sign up" link to login page

- Install sonner for toast notifications
- Add handleForgotPassword function that shows "Not yet available" toast
- Add "Forgot password?" link next to password label
- Verify "Sign up" link to /register exists
- Add Toaster component to public layout
- Mark task 10.3 as [x] in tasks.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marko Djordjevic 2026-02-20 13:28:17 +01:00
parent 42a76ed41b
commit 3b03a87c41
5 changed files with 34 additions and 4 deletions

View file

@ -1,5 +1,6 @@
import type { Metadata } from "next";
import { SessionProviderClient } from "./session-provider";
import { Toaster } from "sonner";
export const metadata: Metadata = {
title: "Candle Annotator",
@ -14,6 +15,7 @@ export default function PublicLayout({
return (
<SessionProviderClient>
{children}
<Toaster />
</SessionProviderClient>
);
}

View file

@ -10,6 +10,7 @@ import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card";
import { AlertCircle } from "lucide-react";
import { toast } from "sonner";
export default function LoginPage() {
const [email, setEmail] = useState("");
@ -55,6 +56,12 @@ export default function LoginPage() {
await signIn("google", { redirectTo: "/app" });
}
function handleForgotPassword() {
toast.info("Not yet available", {
description: "Password reset functionality will be available soon.",
});
}
return (
<div className="min-h-screen bg-background flex flex-col">
{/* Navbar */}
@ -102,9 +109,18 @@ export default function LoginPage() {
/>
</div>
<div className="space-y-2">
<Label htmlFor="password" className="text-xs font-mono">
Password
</Label>
<div className="flex items-center justify-between">
<Label htmlFor="password" className="text-xs font-mono">
Password
</Label>
<button
type="button"
onClick={handleForgotPassword}
className="text-xs text-primary hover:underline font-medium"
>
Forgot password?
</button>
</div>
<Input
id="password"
type="password"